Find answers from the community

Updated 3 months ago

Hi does anybody knows where I can find

Hi! does anybody knows where I can find info about the different types of queries (Synthesis, Routing, Compare/Contrast, etc) and what are the best use cases for each of them?
L
e
10 comments
Have you checked out the docs yet?

This page is a good summary of everything: https://gpt-index.readthedocs.io/en/latest/use_cases/queries.html
yes, I'm coming from there but I'm still not sure what should I use for my use case. The difference between Synthesis and Routing is basically that Synthesis use a list index for the docs therefore it will check all of them in a query and Routing will use Vectors?
and then the Compare/Contrast query sounds like something every use case would need, so I'm not quite sure what's the disadvantage
and then I'm trying to combine one of these queries with a chat agent using create_llama_chat_agent but I'm not sure if the "description" of the tool_config for the agent replaces the index summaries or they are different things
sorry for all the questions
Sorry if the terms are confusing

Synthesis just means sending your data to an LLM for answering questions. It can take a number of forms

Routing refers to deciding which index should be used to answer a question, which is accomplished by using a composable/graph index

Compare/Contrast is a special feature that "decomposes" an initial query into two queries. Usually, this is done because you need data from two specific sources, and then a final query to compare them. Not too common I think, but it does come up. A normal query should work fine in most cases

The description in the tool config is what helps the LLM decide if that particular "tool" needs to be used. It's a neat feature from langchain that basically shows your query/message to the LLM, and it decides if it needs to use a tool based on the descriptions of all the tools available
oh that's much better! thanks for the explanation πŸ™‚
@Logan M do you know if there is a way to get the "thought" of the agent created from create_llama_chat_agent. I can see the log of the agent thought when running the dev server but not in my docker container, so I was looking if maybe this info is somewhere in the agent object.

and last one, I know you answered this before but I can't find the info in the docs, is there a way to stream the responses? Thanks
Hmmm might have to look into the langchain docs, I'm not sure if there is a way or not to capture that πŸ€”πŸ€”

Streaming is supported, but only for text-davinci-003 right now
https://github.com/jerryjliu/llama_index/blob/main/examples/vector_indices/SimpleIndexDemo-streaming.ipynb

I think the agent should also support streaming, but that would also be a langchain option, I'd have to go look that up lol

There is a hacky PR for streaming with gpt3.5/4, but it's not merged, seems like it needs some work
https://github.com/jerryjliu/llama_index/pull/1059
awesome! thanks! πŸ™‚
Add a reply
Sign up and join the conversation on Discord