Find answers from the community

Home
Members
Orion Pax
O
Orion Pax
Offline, last seen last week
Joined September 25, 2024
@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
1 comment
L
Is there a straight forward way to load files from multiple directories into the GPTVectorStoreIndex?
6 comments
O
L
k
I created an index for each file that is uploaded to my server. Now, I'd like users to be able to select multiple files and query them as 1 unified index. I did, this:
Plain Text
# Create index from requested docs
    indices = []
    summaries = []
    service_context = _create_service_context()
    for index_id in data["indexes"]:
        persist_dir = f"/az/indexes/{index_id}" # test index
        storage_context = StorageContext.from_defaults(persist_dir=persist_dir)
        index = load_index_from_storage(
            storage_context=storage_context,
            service_context=service_context,
        )
        summaries.append("")
        indices.append(index)
    graph = ComposableGraph.from_indices(GPTListIndex, indices, summaries, service_context=service_context)
    query_engine = graph.as_query_engine()

    response = str(query_engine.query(data['query'])).replace("\n", " ")

It appears to call open ai multiple times when I expect it to call once on the merged index. Am I combining the indexes incorrectly to create a merged index?
4 comments
L
O
I got llama index working with a personal OpenAI key. Now I tried changing the base and key to use Azure.

Plain Text
os.environ["OPENAI_API_KEY"] = args.openai_key
os.environ["OPENAI_API_BASE"] = args.openai_host

openai.api_type = "azure"
openai.api_version = "2023-03-15"
openai.api_base = os.getenv('OPENAI_API_BASE')
openai.api_key = os.getenv("OPENAI_API_KEY")


But I'm getting this error, now:
openai.error.InvalidRequestError: Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.embedding.Embedding'>
33 comments
L
O