Find answers from the community

Home
Members
Orion Pax
O
Orion Pax
Offline, last seen last month
Joined September 25, 2024
Are there general platforms or best practices for testing workflows?
3 comments
O
L
I've been digging into an issue with the multi concierge flow. I have 2 agents. Each can add or multiply 2 numbers. I ask the system to 'add 10 to 10 and then multiply the result by 20'.

My expectation is that the first agent says "10 + 10 is 20", then transfers. I see this from the tools and chat history:
tools input:
['transfer_to_agent']

chat history:
Plain Text
[ChatMessage(role=<MessageRole.SYSTEM: 'system'>, additional_kwargs={}, blocks=[TextBlock(block_type='text', text="You are on orchestration agent.\nYour job is to decide which agent to run based on the current state of the user and what they've asked to do.\nYou do not need to figure out dependencies between agents; the agents will handle that themselves.\nHere are the agents you can choose from:\nAddition Agent: Used to add two numbers together.\nMultiply Agent: Used to multiply two numbers together.\n\n\nHere is the current user state:\n\n\nPlease assist the user and transfer them as needed.\nDo not make up information or provide information that is not in the user state or agent context.\n")]), ChatMessage(role=<MessageRole.USER: 'user'>, additional_kwargs={}, blocks=[TextBlock(block_type='text', text='Add 10 to 10 and then multiply the result by 22')]), ChatMessage(role=<MessageRole.ASSISTANT: 'assistant'>, additional_kwargs={'tool_calls': [ChatCompletionMessageToolCall(id='call_SOOg9k2TNckhXV3MAITRo4Vs', function=Function(arguments='{"a":10,"b":10}', name='add_two_numbers'), type='function')]}, blocks=[]), ChatMessage(role=<MessageRole.TOOL: 'tool'>, additional_kwargs={'tool_call_id': 'call_SOOg9k2TNckhXV3MAITRo4Vs', 'name': 'add_two_numbers'}, blocks=[TextBlock(block_type='text', text='20')])]


Results in the following tool selection:
Plain Text
[ToolSelection(tool_id='call_34DqgTGSX5VhWVMmCiTgsFhQ', tool_name='multiply_two_numbers', tool_kwargs={'a': 20, 'b': 22})]


Despite not giving it a "multiply_two_numbers" tool, it says that's the next one it should run, so it fails on 'agent_name' missing.
18 comments
O
L
I have a pretty simple setup using the multi concierge demo that should be able to add and multiple numbers (using separate agents). However, if I start a connection and say "Multiply the last answer by 2", the system goes into a never ending loop of transfer to agent, agent requests transfer forever. Any ideas? I don't want this type of occurrence to randomly crash the system once it gets more complex.
1 comment
L
@Logan M for the multi agent workflow, I'm running into a recurring issue where a service returns a progress event over and over no matter what and then it starts returning 429s against OpenAI (meaning too many requests).

Is the retry set to infinite or something? I'm trying to figure out how to get this out of an endless loop.
7 comments
O
L
@Logan M I'm not sure if this is related to the workflow thread, but I have an agent that has three tools 1) get_data 2) use_data_to_gen_html 3) send_email_with_html

My workflow does step 1 and 2 and then hangs and doesn't execute step 3. and times out.
2 comments
O
L
I'm trying out the tool interface. I have a function called something like "get_account_id" which takes an email address parameter. When I ask it to do something for "John Smith" the openaiazure agent is automatically converting the name to email address john.smith@example.com and passing it to the tool. How might I get it to stop that and expect the information to be inputted?
59 comments
O
L
I'm trying to inject existing history into a Chat Engine request, but when I follow the tutorial here: https://docs.llamaindex.ai/en/stable/module_guides/deploying/chat_engines/usage_pattern/#low-level-composition-api

it says that I need index and id, but I can't find examples of those and everything I try gets a pydantic error
7 comments
O
L
Am I missing a concept. The SimpleDirectoryReader.load_data() returns more Documents than the input_files list I send to it. Can someone explain how this makes sense?
31 comments
O
L
j
Let's say you have a pdf with a variety of instructions, including pictures between each instruction. The parsers I'm using seem to only store text. Is there another setup that also support images? I'd like the answers it returns to include the screenshots.
3 comments
O
L
How can I tell which version of llama index is the 'stable' one according to the docs
3 comments
O
L
W
Has anyone tried to support multiple models on Azure with 1 index? Or do you have to rebuild the index every time you want to change the model? If anyone has some example code, that would be lovely 🙂
5 comments
O
L
When I build an index on 1 pdf file, I can request info from that file. "What percent of revenue did [company] spend was on Research and Development in 2018" and I get a response of "10%". However, when I create an index of 10 files including that 1 file, I get the "There is no information provided about what percent of revenue [company] spent on research and development in 2018.

Is there a parameter or class I should be looking at when working with multiple files vs 1 file?
31 comments
O
L
V
Has anyone seen an issue where they index something locally (using the same OpenAIAzure API) and get a reasonable answer, but when you deploy it as a docker image, the retriever doesn't return the correct/same text from the same file?
1 comment
O
I have 10 transcripts in an index. Each one has a file with <transcript id>.txt as the name, and the id is also in the file along with the file name.

When I say "Summarize file <file id>.txt" or "Summarize the transcript with id: <id>" it always gets nodes from a different file. Is there a way to get the retrieval to return the correct file summary or do I need to create indexes for each file if I want to do extraction from each?
5 comments
L
O
This guide doesn't seem to work anymore as "as_structured_llm" doesn't seem to exist for OpenAI
https://docs.llamaindex.ai/en/stable/examples/structured_outputs/structured_outputs/#2-plug-into-rag-pipeline
25 comments
O
L
The guide on this page for structured outputs goes to a 404. Anyone know where it should link to? I'm getting an error when using the output_cls for query engines and I assume I'm doing something wrong.
https://docs.llamaindex.ai/en/stable/module_guides/querying/structured_outputs/#starter-guide
1 comment
O
If I ask "Why is the sky blue" to a index of a pdf of insurance data, I assume it should respond with something like "That information isn't in the provided context", but instead the response still includes info about Raliegh scattering
8 comments
R
O
L
I have a pretty simple use case where I'm trying to stream back results with FastAPI. When I log the token over the response iterator, I see each token being logged in the console, but I'm not seeing the streamed results. Anyone see an issue I'm missing?
Plain Text
async def response_streamer(response):
    for token in response:
        logger.info(token)
        yield f"{token}"

class ChatInput(BaseModel):
    query_text: str

@app.post("/chat")
async def query_index(chat_input: ChatInput):
    global index

    chat_engine = index.as_chat_engine(
        chat_mode="condense_question",
        verbose=True,
        llm=Settings.llm,
    )

    streaming_response = chat_engine.stream_chat(chat_input.query_text)
    return StreamingResponse(
        response_streamer(streaming_response.response_gen),
        media_type="text/event-stream",
        status_code=200,
    )
3 comments
O
W
The LLM_Predictor class doesn't seem to exist anymore.
5 comments
L
W
O
If I insert the same document into a pinecone db using llama index, should I expect it to update the existing one or create duplicate? Currently it's creating a duplicate, which is undesirable.
10 comments
O
L
Is there a documented method to use Azure container storage for your documents? Having trouble finding an example of reading in files into the index that way. I've been using SimpleDirectoryReader up until now, but I'm curious if there's a method to stream the files from acs, instead.
8 comments
O
L
Thanks again for this @Logan M. I started investigating Pinecone as a vector store. I'm having trouble finding:
  1. How do you delete documents from an index.
  2. How to add a namespace.
  3. How to add documents under a namespace.
  4. How do you add metadata for filtering for a query.
  5. How to update metadata for a filtering on existing docs.
10 comments
O
L
In the query response, you can get the list of source_nodes. Is there a parameter for retrieving the file/document the source node came from?
53 comments
L
O
O
Orion Pax
·

Eval

Is there a method built in to evaluate a set of responses against a test set? I've seen the evaluation pipeline, but that seems to help tell you what source produced the response and self-test if the response is good (or hallucinated). I have a set of FAQs with the expected result and I want to compare the response to the expected response.
3 comments
O
L
The Notebook linked here (https://gpt-index.readthedocs.io/en/latest/how_to/evaluation/evaluation.html) results in a 404 on github.
1 comment
L