Understanding Content-Aware AI Chats
Introduction
Content-aware AI chat systems combine the power of large language models with specific page content to provide more accurate and contextual responses. This approach ensures that the AI assistant can reference and explain the exact information present on the page.
Key Components
-
Content Integration
- Page content is automatically included in the system prompt
- Content is properly formatted and truncated if needed
- Special markers help the AI identify the content section
-
Configuration Options
- Enable/disable content inclusion with
includeContent
- Customize content prefix with
contentPrefix
- Control maximum content length
- Adjust system prompt for specific use cases
- Enable/disable content inclusion with
-
Enhanced Responses
- AI can quote specific sections
- References are accurate and verifiable
- Clear distinction between content knowledge and general knowledge
Best Practices
When using content-aware chats:
- Keep content focused and relevant
- Structure content with clear headings
- Use descriptive section titles
- Include important details you want the AI to reference
Technical Implementation
The system works by:
- Reading page content during render
- Processing and cleaning the content
- Including it in the system prompt
- Configuring the AI to reference this content
This creates a seamless experience where the AI can discuss the specific details of each page while maintaining its general knowledge capabilities.