Find answers from the community

Home
Members
Ahsan Mirza
A
Ahsan Mirza
Offline, last seen 3 months ago
Joined September 25, 2024
Hello Team. I'm using llama_index for knowledge base. When the user query to index, it works fine.
A new requirement is the document will be uploaded to be analysed by the chatbot to check if the document is in compliance with law (knowledge base) to flag errors if found or make recommendations if needed.
2 comments
L
A
A
Ahsan Mirza
·

Loader

Hello..
how to use PagedCSVReader with latest version of llama_index
download_loader is deprecated ,

/Users/ahsan/Desktop/SageByte/lloyed/lloyed-aidev/load_vector.py:203: DeprecationWarning: Call to deprecated function (or staticmethod) download_loader. (download_loader() is deprecated. Please install tool using pip install directly instead.) loader = PagedCSVReader(encoding="utf-8")
9 comments
A
L
W
A
Ahsan Mirza
·

Hello.

Hello.
we have developed an app using llama_index and it is in production. Now we have seen an error in production that says
The model text-divinchi-003 has been deprecated with llama-index version 0.7.7.
How can we update to alternate model?
13 comments
A
L
W
Hello, I'm curious about the discrepancy in behavior between the OpenAiAgent and the as_chat_engine when retrieving answers from the knowledge base. While using as_chat_engine, the responses align with the information in the knowledge base and are accurate. However, when employing OpenAiAgent, it seems to exhibit a different behavior. Could you please shed light on this inconsistency?
Here is my code:
system_messages = [ ChatMessage(role=MessageRole('system'), content="🌟 Welcome to our chat!"), ChatMessage(role=MessageRole( 'system'), content="🤖 I'm your friendly bot assistant. Ask me anything and let's explore together!"), ] messages = custom_chat_history messages.extend(system_messages) memory = ChatMemoryBuffer.from_defaults(chat_history=messages) agent = OpenAIAgent.from_tools( query_engine_tools, verbose=True, memory=memory) response = agent.chat(text)
4 comments
A
L
Hello team. My question is could we use chat_engine with SubQuestionQueryEngine?
if yes please send me an example url. thanks
12 comments
A
L
Hello Team
policies_storage_context = StorageContext.from_defaults( persist_dir="./custom-knowledge-base") policies_index = load_index_from_storage(policies_storage_context) policies_engine = policies_index.as_query_engine(similarity_top_k=10) memory = ChatMemoryBuffer.from_defaults(token_limit=1500) chat_engine = policies_index.as_chat_engine( memory=memory, chat_mode="condense_question", ) response = chat_engine.chat(text)

Here is my chat_engine, so i want that it should remember the previous conversation and able to answer from the previous answers and questions. Right now if im asking a question like What was my previous question it reply back with apology message.
7 comments
r
A
Hello everyone!
my question i've thousands of files mixture of pdf's, doc's, csv's. Need to create chatbot of those files. is it possible to do it and what how can we achieve the accuracy?
if yes please guide me i'm new to llama_index
3 comments
L
A
Does llama_index work on metadata filtering? I mean we have 30 pdf files with same format and can we ask questions from specific file?
19 comments
A
L
could we gave here directory of csv files?
21 comments
L
A
W
Hello Team!
I am in the process of developing a mediation chatbot to facilitate conversations between two parents (Parent1 and Parent2) without a predefined knowledge base. I am considering using Llama Index but have some queries. Can Llama Index be suitable for a scenario without a knowledge base? How can I configure the chatbot to allow independent engagement for Parent1 and Parent2? Also, how can the chatbot effectively address their issues and summarize the conversations for submission to a Mediator? Your guidance on the feasibility of Llama Index in this context and any alternative solutions would be greatly appreciated. Thank you for your valuable insights.
11 comments
L
A
Hello team!
i'm trying to read documents using SimpleDirectoryReader but it gives this error.
The error is coming from a pptx file that contains images.

def get_file_metadata(filename: str) -> Dict: file_name = os.path.basename(filename) file_name_without_extension = os.path.splitext(file_name)[0] metadata = {"file_name": file_name_without_extension} return metadata chatbot_data = SimpleDirectoryReader("data/", file_metadata=get_file_metadata).load_data()

Here is my code for Reading Data folder
20 comments
r
A
While reading the CSV data using PagedCSVReader download_loader, there is no metadata but while reading pdf files there is meta like
"metadata": {
"page_label": "2",
"filename": "120.pdf" },This is the doc[0] of csv reader. Document(id='7575e0eb-2492-40c6-944e-93011f36fdcb', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={}, hash='5199644cc725f8441d76c340ca8e6d7d81525287682ed0f906add61ea316b8fd', text='Address: Tv\n928 E Vermijo Colorado Springs: No\n: ', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\n\n{content}', metadata_template='{key}: {value}', metadata_seperator='\n')

My question is is there any chance to reading csv files to put metadata like file_name.
2 comments
L
A
Hi, I've created an index of more than 100+ pdf files. Now i want to search the pdf file with the name of file. QueryEngine does not pull the information from file by its name.
One more question is i've created 5 indexes and how we can query to spefic index like if i ask question and the answer is inside the "index_1" so how can we avoid to generating more sub-questions.
18 comments
A
L
Hi! I ran into a issue today and I'm not sure how to handle it. I created three vector stores for my different kind of files.
1 - Policies Index
2- Property Information Index
3- Property Invoice Index.
After that i created query_engine_tools to query with different indexes.
Property invoice files are contains Table data and query_engine does not get the expected results. Sometimes it says not enough information and sometimes it gives wrong information. it didn't give response on the quantity of different items in property.
I used vectorStoreIndex in my all indexes. Please suggest which index will be used for table format and how to query it in better way. Thanks
8 comments
A
L