Questions tagged [nlp-question-answering]

Question Answering is the computer task of mechanically answering questions posed in natural language. (Please do not use this tag to indicate that you have a question and want an answer. That's already implied.)

Filter by
Sorted by
Tagged with
-1 votes
0 answers
13 views

what are the essential pip package modules required for downloading an application? [closed]

running into problems with pip when installing an application. asking for guidance on the critical pip package modules that must be downloaded in order to manage dependencies and guarantee a seamless ...
Faheem Niyas's user avatar
0 votes
0 answers
24 views

Langchain map_reduce can't load gpt2 tokenizer error

I'm trying to summarize the huge context using Langchain's map_reduce chain and using locally stored llama 2 7b model. My org has blocked hugging face and whenever I try to run the load_summarize ...
ckd's user avatar
  • 1
-1 votes
0 answers
19 views

Error when Fine Tuning MobileBERT for Question Answering

i have a problem when i try to fine tuning MobileBERT for question answering model from Transformer using TensorFlow. I have a dataset in .txt format, and each line consists of a question and an ...
Gabriel Fernando's user avatar
0 votes
1 answer
178 views

Map_Reduce prompt with RetrievalQA Chain - Langchain

in the code below you see how I built my RAG model with the ParentDocumentRetriever from Langchain with Memory. At the moment I am using the RetrievalQA-Chain with the default chain_type="stuff&...
Maxl Gemeinderat's user avatar
-1 votes
0 answers
28 views

logits and labels must have the same first dimension, got logits shape [..., ...] and labels shape [...]

i need your help, i don't where's my fault for this problem. I hope someone can help me to solve my problem. My problem is: i got an error like below: InvalidArgumentError: Graph execution error: ...
Gabriel Fernando's user avatar
0 votes
0 answers
95 views

LLM Question answer models for yes or no answers

imagine I have the following dataset: import pandas as pd # Positive and negative sentences positive_sentences = [ "I love this product!", "The weather is beautiful today."...
Economist_Ayahuasca's user avatar
1 vote
2 answers
319 views

Retrieve page from the PDF in PDF-chatbot using Langchain

I have developed a small app based on langchain and streamlit, where user can ask queries using pdf files. The code is mentioned as below: from dotenv import load_dotenv import streamlit as st from ...
Learner's user avatar
  • 762
0 votes
0 answers
13 views

Simple Transformer Question Answer model error showing input should be list of examples

This is the code for the resume dataset which was in DataFrame format. I tried to make it as json format as required by Simple Transformer. I have 5 sets of questions which repeats for each row in the ...
Sugam Sharma's user avatar
0 votes
0 answers
82 views

How to evaluate Retriever in Haystack python using retriever.eval() method

I am trying to understand Haystack package for building Question and Answering systems. As part of evaluation of the QA system, I want to evaluate the performance of retrievers independently for ...
Gouse73's user avatar
  • 35
1 vote
0 answers
22 views

I am trying to make a product which will reformat the answer using the question and Sql_answer as data

Question:"How many employees are there in Department X" Sql_answer:[('2'),] I want the model generate the answer in this format: Expected answer:"There are 2 employees in Department X.&...
S_K's user avatar
  • 31
0 votes
0 answers
59 views

How can I do question-answering with Haystack with a list of triplets (question, question, answer) as the database?

I have a list of triplets (question, question, answer). In other word, each answer has 2 questions. I want to retrieve the answer that matches a user's question by computing the semantic similarity ...
Franck Dernoncourt's user avatar
0 votes
0 answers
42 views

Question answer generation using BERT embedding and LSTM layer?

How i use the BERT embedding as embedding layer with LSTM for generation quesiton answer ? I have tried bert embedding but i am not able stack the bert embedding with LSTM in question answer ...
Abhishek Pandey's user avatar
-1 votes
1 answer
53 views

Do I need to use ElasticSearch for open generative qa?

I am trying to build an NLP model that will ask the user a question and try to generate its answer using some documents like PDF, i.e., an open generative QA (please correct me if I am wrong). For the ...
Sheikh Taha Maroof's user avatar
0 votes
2 answers
360 views

Can we control number of documents to return in RetrievalQA Langchain

Can we control the document query parameter in RetrievalQA() like we could do in vectorDBQA() in langchain before? Also, shall I use map_reduce chain type instead for my large documents? I tried to ...
Uvular's user avatar
  • 13
2 votes
0 answers
62 views

ModuleNotFoundError: No module named 'transformers.modeling_roberta'

I'm trying to run this project in github: https://github.com/dr-majie/WSTQ and unfortunatly getting no respone on the issue I've created from the writers. I tryied to run it using creating an anaconda ...
H_88's user avatar
  • 21
0 votes
1 answer
130 views

'TFGPT2LMHeadModel' object has no attribute 'device'?

I added two models to my project where model 'TFGPT2LMHeadModel' has the error of not finding the device attribute in this model. One of my functions named generate_desc takes attributes like a model, ...
Light Yagami45's user avatar
1 vote
0 answers
237 views

Json file based Question and answering model using VertexAI

I'm working on document based question and answering model using vertexAI.. But here I'm using Json file instead of document such as PDF or DOCS. Consider that, the 1000s of json file which contains ...
Karthick Pandian's user avatar
-2 votes
1 answer
478 views

Predicting next questions in llm powered chatbot

I am building a question answering chatbot powered by llms. I have seen in chatbots like bing chat it predicts what might be the top three next questions user may ask. My question is: How would I do ...
CaptainAmerica's user avatar
0 votes
0 answers
52 views

NVIDIA NeMO container Intent / Slots Filling training issue

I setup the NVIDIA nvcr.io/nvidia/nemo:23.06 container, started jupyter, I can go through all steps of the notebook Joint Intent and Slot Filling, GPU is recognized but if I run training then only 1 ...
Rick's user avatar
  • 33
0 votes
0 answers
9 views

Chatbot with camenBert - Not response

Good morning, I'm trying to develop a little bot that can answer questions based on a small knowledge base loaded beforehand in text format. I launch the bot I can ask my question but it only returns ...
demenvil's user avatar
  • 1,089
1 vote
3 answers
3k views

Getting an error when trying to use ChromaDB

I am new to LangChain and I was trying to implement a simple Q & A system based on an example tutorial online. The code is as follows: from langchain.llms import LlamaCpp from langchain.llms ...
adhok's user avatar
  • 391
0 votes
0 answers
118 views

Chat with spreadsheet using meta-llama/Llama-2-13b-chat-hf

I made a spreadsheet which contain around 2000 question-answer pair and use meta-llama/Llama-2-13b-chat-hf model. But when start querying through the spreadsheet using the above model it gives wrong ...
aiwesee's user avatar
5 votes
2 answers
1k views

how to make privateGPT retrieving info only from local documents?

I'm using privateGPT with the default GPT4All model (ggml-gpt4all-j-v1.3-groovy.bin) but also with the latest Falcon version. My problem is that I was expecting to get information only from the local ...
TheOldMan's user avatar
2 votes
1 answer
616 views

Relationship between embedding models and LLM's inference models in a RAG architecture

I am trying to implement a RAG architecture in AWS with documents that are in Spanish. My question is the following: does it matter if I generate the embeddings of the documents with a model trained ...
Josalo9's user avatar
  • 33
0 votes
1 answer
24 views

Is 'examples' a default output variable for HuggingFace transformers library?

I'm running various example code from HuggingFace docs, and a variable examples repeatedly appears in these tutorials. Many functions have it as a formal parameter: def preprocess_function(examples): ...
pol0's user avatar
  • 33
0 votes
0 answers
26 views

Purpose of using special tokken in DONUT

text in this code they have used special tokken as New special tokens: ['<s_total>', '</s_total>', '<s_date>', '</s_date>', '<s_company>', '</s_company>', '<...
shubham bhardwaj's user avatar
1 vote
1 answer
2k views

How can I use `langchain.document_loaders.PyPDFLoader` for pdf documents uploaded on StreamLit?

I am trying to build a webapp using StreamLit for reading documents (mainly pdf) and load the data using langchain.document_loaders.PyPDFLoader but I am ending up with an error as follows: TypeError: ...
Shuhul Handoo's user avatar
1 vote
2 answers
4k views

Retrieving the page number from the document in question-answering task [LangChain]

I am building a question-answer app using LangChain. Following the numerous tutorials on web, I was not able to come across of extracting the page number of the relevant answer that is being generated ...
Shuhul Handoo's user avatar
0 votes
0 answers
26 views

How to build a model in Python which will allow me to have discussion(question - answer) with my data which is in csv format?

I have the above dataset. I want to create a model which allows me to ask questions to the data and answers them correctly, my questions are not predefined and depend on the user at that particular ...
apurva bhujbal's user avatar
0 votes
1 answer
62 views

Generating Q&As from Cyrillic languages with Deepset Haystack

I'm trying to generate questions and answers based on an uploaded text. I'm using opensource library Haystack by Deepset in order to do that as it works great with English texts. However, with ...
user164863's user avatar
3 votes
2 answers
1k views

Deploying (and hosting) a LangChain code on StreamLit throws PydanticUserError

I built a pdf document question-answering using LangChain, OpenAI (embeddings and LLM) and Chroma (for storing the vector embeddings) and UI with StreamLit. I am trying to deploy and host the webapp ...
Shuhul Handoo's user avatar
0 votes
0 answers
70 views

Change a pandas Data Frame to Hugging Face Dataset for Question Answering

I should change a pandas Data Frame to the Hugging Face Dataset object, this will be used in the Question Answering Task and I want to fine-tune the model for further prediction on my custom dataset. ...
Sahar Y.M's user avatar
0 votes
0 answers
44 views

Bert return nan as lost

I am trying to make an model that is trained on custom data to eventually make a chatbot from it. The problem is training the model resolves in loss as nan. I am trying to to train the model and see ...
Vicklo's user avatar
  • 1
-1 votes
0 answers
46 views

Best Local Model for Running Questions on Docs

Looking for some recommendations with respect to ideal LLM models that fit the following criteria:- Open Source Downloadable (can be run offline on local server) Can be used for answering questions ...
Abhay's user avatar
  • 83
0 votes
0 answers
17 views

Train T5 on Conversational Machine Comprehension Datasets

I have been trying to fine-tune the T5 model on Conversational Machine Comprehension Datasets with no satisfactory results. Particularly, I have been trying it on QuAC, with unanswerable questions. I ...
padfoot96's user avatar
0 votes
1 answer
1k views

Updater.__init__() got an unexpected keyword argument 'token'

Updater.__init__() got an unexpected keyword argument 'token' It shows the error when I perform this updater = Updater(token=TOKEN, use_context=True) I got strucked by this error anyone help me to ...
Chukkala Jayanth's user avatar
1 vote
1 answer
647 views

How to structure data for question-answering task to fine-tune a model with Huggingface run_qa.py example?

import sagemaker import boto3 from sagemaker.huggingface import HuggingFace try: role = sagemaker.get_execution_role() except ValueError: iam = boto3.client('iam') role = iam.get_role(...
Tom Bomer's user avatar
2 votes
1 answer
773 views

Why does Pinecone repeatedly return the same result from my series of documents?

When using Pinecone in Langchain, whenever I do a similarity search -- which is supposed to return the most relevant documents to my query -- I find that it returns the same document again and again. (...
Yishai Rasowsky's user avatar
0 votes
0 answers
26 views

Why does my Flask chatbot code take a very long time to execute and does not respond at the 'app.run()' step?

very long time consumed in executing the code and with no response I've tried running the below code many times which is for creating a web application for a custom Q&A chatbot feeded by a custom ...
ahmed hamdy's user avatar
1 vote
0 answers
759 views

Access the retrieved memory in LangChain

Is there any way to access the retrieved vectordb information (imported as context in the prompt)? Here is a sample code snippet I have written for this purpose, but the output is not what I expect: ...
Monaj's user avatar
  • 864
3 votes
1 answer
3k views

Losing data of vector store Chromadb using Langchain

I am writing a question-answering bot using langchain. For storing my data in a database, I have chosen Chromadb. I have written the code below and it works fine persist_directory = "./db" ...
kheirq's user avatar
  • 31
0 votes
0 answers
50 views

Using BERT Q&A model (SQUAD) to answer questions from a dataset

I am developing a custom BERT Q&A model (in the same format as SQUAD) with a view to pose questions to a dataset for an answer (the dataset is large collection of reports). Is it possible to use ...
Jon's user avatar
  • 91
1 vote
0 answers
175 views

mT5 Question/Answering fine tuning is generating empty sentences during inference

mT5-small Question Answering training is converging to high accuracy, high validation accuracy, near-zero low loss; however, when testing the model on trained questions, I am always receiving empty ...
Moustafa Banbouk's user avatar
0 votes
0 answers
20 views

PoS Tagging in QA Model

my code: import numpy as np def pos_tag_fun(x_list, tag): tagged_sentences = [] for sentence in x_list: tagged = nltk.pos_tag(sentence) tagged_sentences.append(tagged) print(...
rash's user avatar
  • 1
0 votes
0 answers
745 views

Prompt tuning for Dolly-v2-7b model for Question and Answer giving gibberish output?

I am following this page for Prompt tuning for Dolly-v2-7b model for Question and Answer: https://huggingface.co/docs/peft/task_guides/clm-prompt-tuning Instead of doing the training in old pytorch ...
MAC's user avatar
  • 1,377
3 votes
1 answer
365 views

How can I find the cosine similarity between two song lyrics represented as strings?

My friends and I are doing an NLP project on song recommendation. Context: We originally planned on giving the model a recommended song playlist that has the most similar lyrics based on the random ...
yyy818's user avatar
  • 33
1 vote
0 answers
14 views

what should be the value of the "input_lenghts" in "forward function" in encoder rnn in seq2seq model

i'm training an encoder rnn for sequence to sequence model with batches of 10 sentences . every batches have 10 sentences. and every sentences have 60 words. in the encoder network of the seq2seq ...
user avatar
1 vote
0 answers
93 views

Segmentation fault: 11 when loading Haystack DensePassageRetriever

I am trying to run this Question Answering model using this doc https://haystack.deepset.ai/tutorials/12_lfqa, but running into segmentation fault as below. I am using Python 3.9.17. May laptop has 64 ...
user691197's user avatar
0 votes
0 answers
23 views

can i use IndicBERT for question answering system

i want to build a question answering system in kannada language. the context is set for BMTC bus routes, the user asks a question "from kempegowda bus stand i want to go to Jallahalli cross, what ...
Aniruddh H S's user avatar
1 vote
2 answers
1k views

ModuleNotFoundError: No module named 'haystack.nodes'

I am following the tutorial from haystacks website for Extractive QA system. I am trying to convert PDF to Text. Link to the blog is here : (https://www.deepset.ai/blog/automating-information-...
Panda Bear's user avatar

1
2 3 4 5