Document Q&A
The Document Q&A template lets users upload a file and ask questions about its content. The LLM reads the document and answers questions based solely on what's in the file — without hallucinating information that isn't there.
How the flow works
_10File → Prompt → Language Model → Chat Output_10 ↑_10 Chat Input
The File component loads the document and passes its text content to the Prompt component. The Prompt merges the document text with the user's chat message and sends it to the Language Model, which generates an answer grounded in the document.
Prerequisites
- An API key for a supported LLM provider (e.g., OpenAI)
- A document to upload (PDF, TXT, DOCX, and other common formats are supported)
Quickstart
-
In Orbis Studio, open the Templates library and select Document Q&A.
-
In the Language Model component, add your LLM API key and select a model.
-
In the File component, upload the document you want to query.
-
Open the Playground and ask a question about the document — for example: "What is the main conclusion of this report?"
Key components
| Component | Role |
|---|---|
| Chat Input | Receives the user's question from the Playground |
| File | Loads and extracts text from the uploaded document |
| Prompt | Combines the document content and user question into an LLM prompt |
| Language Model | Answers the question based on the document content |
| Chat Output | Displays the answer in the Playground |
Configuration tips
- Supported file types: PDF, TXT, DOCX, CSV, and most plain-text formats. Very large files may be truncated depending on the model's context window.
- Prompt tuning: Edit the Prompt template to add instructions like "answer only from the document, say I don't know if the answer is not there."
- Multiple documents: To query several files at once, add more File components and connect each one to the Prompt.
Next steps
- For large document collections, use Knowledge Ingestion to index documents into a Knowledge Base and Knowledge Retrieval to search them semantically.
- Add Message History to allow follow-up questions within the same document session.