Overview
Once you’ve uploaded documents, you can ask questions about their content. RAG Chat uses your documents as context to provide accurate, grounded answers.The Chat Interface
The main chat interface appears in the center of the application:app.py
You must upload at least one document before you can ask questions. The chat input only becomes active when documents are loaded.
How Question Answering Works
Context Retrieval
The system searches the vector store for relevant document chunks:The retriever finds the most semantically similar chunks to your question.
app.py
System Prompt
RAG Chat uses a specific system prompt to guide AI responses:app.py
Conversation History
RAG Chat maintains conversation history throughout your session:app.py
Example Questions
Factual Questions
Comparative Questions
Analytical Questions
Follow-up Questions
Understanding Responses
Markdown Formatting
Responses are rendered with full markdown support:- Bold and italic text
- Bullet points and numbered lists
- Code blocks
- Tables
- Headings
Grounded Answers
If the AI cannot find relevant information in your documents, it will explicitly state that the information is not available rather than making up an answer.
Context-Based Responses
All answers are based on the content of your uploaded documents. The AI:- ✅ Uses only information from your documents
- ✅ Cites specific details from the context
- ✅ Admits when information is unavailable
- ❌ Does not use external knowledge
- ❌ Does not make assumptions beyond the document content
Chat Workflow
app.py
Best Practices
Effective Question Strategies
What to Expect
- Relevant Context: The retriever finds the most relevant chunks from your documents
- Synthesized Answers: The AI synthesizes information from multiple chunks if needed
- Honest Limitations: If information isn’t in your documents, the AI will tell you
- Rich Formatting: Responses use markdown for better readability
Troubleshooting
No Response Generated
- Ensure documents are uploaded (check for “Carregando arquivos…” completion)
- Verify your OpenAI API key is configured
- Check that you’ve selected a model
Irrelevant Answers
- Try rephrasing your question more specifically
- Ensure your documents contain information about the topic
- Consider uploading additional relevant documents
”Information Not Available” Responses
- This means your question can’t be answered from the uploaded documents
- Try uploading documents that contain the relevant information
- Rephrase your question to align with document content
Next Steps
Model Selection
Choose the right GPT model for your needs
Configuration
Customize system prompts and other settings