Chat UI answers section-specific questions correctly, but Chat API ignores indexed nodes and falls back to generic assistant #94
Unanswered
parthpaliwal-49
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi PageIndex team,
I’m integrating PageIndex via the Python SDK and I’m seeing a consistent difference between the Chat UI and the Chat API (chat_completions) behavior.
What works in the UI:
Upload a PDF (e.g., an air-conditioner operating manual)
Ask a section-specific question like “Give me OPERATING TIPS from the document”
The UI correctly retrieves and summarizes the exact section
What fails via the API:
The same document is uploaded and fully processed (status=completed)
get_tree() shows nodes with titles, page indexes, and extracted text (e.g., OPERATING TIPS)
Calling chat_completions(messages, doc_id=...) with the same question
The model calls recent_documents, claims the document is missing, and answers generically
From MCP traces, it appears that when retrieval confidence is low, the Chat API silently falls back to a generic assistant and ignores the document — even though the node content exists and is retrievable via get_tree().
Questions:
Is this difference between the Chat UI and Chat API expected behavior?
Does the UI use additional retrieval orchestration (retries, node/page binding, forced grounding) that is not exposed via the API?
Is there a documented or recommended way to force the Chat API to answer only from indexed document content or specific nodes?
If not, should section-level or procedural Q&A be implemented using the retrieval endpoints instead of chat_completions?
I’m trying to understand the intended usage boundaries here
Thanks in advance for clarification.
Beta Was this translation helpful? Give feedback.
All reactions