Find answers from the community

Home
Members
Simonas
S
Simonas
Offline, last seen 3 months ago
Joined September 25, 2024
S
Simonas
·

Token usage

Hey Team, how can I pass these values to a response object together with answer:
INFO:llama_index.token_counter.token_counter:> [get_response] Total LLM token usage: 1221 tokens
INFO:llama_index.token_counter.token_counter:> [get_response] Total embedding token usage: 0 tokens
2 comments
S
L
S
Simonas
·

Rate limit

another question, already asked, what is the best way to cost/performance point of view to ask/collect many questions answers?
I usually hit API rate limit, and huge bill
2 comments
S
L
Could I set a fallback mechanism when I get
Plain Text
  raise ValueError("Failed to select query engine") from e
ValueError: Failed to select query engine 
using query engine router?
1 comment
L
S
Simonas
·

Token cost

To retrieve one question cost around 1000 tokens, is there a way to reduce the token usage? I already using optimiser
1 comment
L
S
Simonas
·

Hi

Hi!
Simple question. How can I chain query results or what is the best approach?
Example:
answer_1 = query_engine.query("Question 1?")
answer_2=query_engine.query("Question 2?")
answer_3=query_engine.query("Question 3?")

Make a report based on [answer_1, answer_2, answer_3].

Should I simply loop through questions/answers and feed them to LLMChain for the end result?
I tried to give all questions to the agent, but it finishes the chain after the first question is answered.
Also, agent some fail when the query router fails to select the engine for the query
4 comments
L
S
Plain Text
query_engine_builder = QASummaryQueryEngineBuilder(service_context=service_context_gpt3)
how can I persist index, not to create every time?
6 comments
S
L
Good morning! I have a question about sharing a knowledge base among users. I'd like to create a solution that stores all data in a single vector store or database. However, I want to restrict user access to only certain portions of the data. Is there a way to namespace the knowledge base so that each user can only access their designated areas?
1 comment
a