Inconsistency in Query & Chat API

Hi guys. I am trying to use the chat api on a corpus. The problem I am facing is that even though the document is indexed, and contains information, the api returns `I do not have enough information to answer the question`. Meanwhile, If I ask the same question on the query api, I get a good answer.

Hi @Bilal_Javed,

Thanks for reaching out! The Chat API has been deprecated and no longer recommended for use. Our Agent API provides better conversational capabilities and more reliable results.

Getting Started:

Check out our Agent docs and quickstart to create and chat with an agent in the UI.

You can also try the following:

1. Create an agent using POST /v2/agents and configure it with your corpus.

2. Start a session using POST /v2/agents/{agent_key}/sessions

3. Chat with the agent using POST /v2/agents/{agent_key}/sessions/{session_key}/events

Let me know if you have any other questions.

Ok, so I tried the agent api. I had a few concerns:

  • It does not provide references in the answer as the chat API.
  • It is slower than the chat API.

Are there any solutions for this?

To get references in agent responses, you can add citations to the tool configuration (e.g. corpora search).

Agents may be slower because they route through the LLM first instead of a search first query API and you can try the following:

  • Use a faster model (avoid “thinking” models).
  • Reduce search results (limit: 10, max_used_search_results: 5).

Thank you! I already have the corpora search tool configured. I tried adding an instruction to instruct the model to add references. It adds page numbers in the answer. Is there any way I can get highlights as well? Something similar to the query api?