DocuChat Logo
Chatbots

AI Settings

Customize your chatbot's behavior and responses with various AI settings available in DocuChat.

DocuChat provides a range of AI settings to tailor your chatbot's responses and behavior. By configuring these AI settings, you can create a chatbot that is aligned with your specific objectives and user expectations.

Temperature

The temperature setting controls the randomness of the chatbot's responses. A higher temperature results in more creative and varied responses, while a lower temperature produces more deterministic and focused answers. Adjust the temperature to balance creativity and precision based on your use case.

Custom Instructions

Custom instructions allow you to provide specific guidelines or rules that the chatbot should follow when interacting with users. Use this setting to ensure the chatbot aligns with your brand's tone or to enforce specific conversational protocols.

We recommend using clear and concise language for the best results.

Example:

  • "Always address the user by their first name."
  • "Maintain a friendly tone throughout the conversation."
When you enable custom instructions, they are added to DocuChat's default system instructions to the AI model. This allows you to extend and customize the behavior while maintaining DocuChat's core functionality. If you want complete control over the instructions, you can disable this behavior in the next section.

Replacing DocuChat's Default Instructions

You can use the "Replace DocuChat System Prompt" toggle to replace DocuChat's default instructions with your custom instructions. When enabled, this option gives you complete control over your chatbot's behavior.

Only enable this if you fully understand the implications, as it will override DocuChat's built-in safeguards and response patterns. Our default system prompt has been carefully optimized to ensure that your chatbot performs exceptionally well right out of the box. It includes instructions that guide the chatbot to provide accurate, relevant, and helpful responses based on the information provided in the uploaded documents.

Implications of Toggling On Custom Instruction Mode

  1. Starting from Scratch: By enabling Custom Instruction Mode, you will be starting from a blank slate and will need to write a comprehensive prompt that covers all aspects of your chatbot's desired behavior.
  2. Removal of Guardrails: Our default prompt includes guardrails that prevent the chatbot from engaging in undesirable behavior. By replacing the default prompt, you will remove these safeguards, so it's essential to incorporate your own guardrails into your custom instructions.
  3. Relying on Sources: To ensure that your chatbot provides accurate information, it is highly recommended to include an instruction in your custom prompt that directs the chatbot to rely on the "sources" (i.e., the document chunks) when answering questions.

Auto Add User Context

The Auto Add User Context setting allows your chatbot to automatically collect and utilize information about the user's environment when processing queries. When enabled, this feature enriches each chat message with details about the user's:

  • Device type and specifications
  • Browser information
  • Operating system details

This contextual information helps the chatbot provide more personalized and relevant responses, particularly beneficial for:

  • IT support chatbots
  • Technical assistance scenarios
  • Troubleshooting applications
  • Platform-specific guidance

Example: When a user asks "How do I install the VPN?", the chatbot can automatically:

  • Detect if they're using macOS or Windows
  • Provide the correct installation steps for their specific operating system
  • Include relevant screenshots or commands for their platform
  • Warn about platform-specific requirements or limitations
This feature is especially valuable when your documentation includes platform-specific instructions or when users might need different solutions based on their system configuration.
When enabling Auto Add User Context, you are responsible for ensuring data protection and privacy compliance, including notice and consent requirements. Make sure to update your privacy policy to disclose this data collection and obtain appropriate user consent as required by applicable regulations (e.g., GDPR, CCPA).

Semantic Search Ratio

The Semantic Search Ratio is an alpha parameter that determines the proportion of search results coming from semantic similarity search versus keyword-based search when your chatbot queries the uploaded documents. Our hybrid search approach combines these two methods to provide the most relevant information:

  1. Semantic Search: Uses embeddings to understand the meaning and context of the query and documents. It focuses on semantic similarity between the query and content, allowing the chatbot to find relevant information even without exact keyword matches.
  2. Keyword Search: Uses the BM25 algorithm to emphasize exact keyword matches between the query and documents. This method is effective for finding specific terms and phrases within the text.

By adjusting the Semantic Search Ratio, you can control the balance between these search methods:

  • Higher ratio (e.g., 0.8): Prioritizes semantic search results, making the chatbot better at understanding query intent and providing contextually relevant responses.
  • Lower ratio (e.g., 0.2): Prioritizes keyword search results, making the chatbot more focused on finding exact keyword matches.

The optimal ratio depends on your documents and desired chatbot behavior:

  • For technical documents with domain-specific terminology, a lower ratio may be more effective.
  • For conceptual documents covering broad topics, a higher ratio may help better understand context.
Start with a balanced ratio (0.5) and adjust based on chatbot performance and user feedback to find the optimal balance for your use case.

Reranking

Reranking is an optional step that can be enabled to enhance the accuracy of your chatbot's responses. When enabled, a reranking model is applied as a final filter on the retrieved relevant chunks from your uploaded documents. This helps to ensure that the chatbot uses the most accurate and appropriate information to generate its responses.

Disabling reranking does not mean that the chatbot will use irrelevant document parts. The initial search among the documents is still highly accurate, but reranking provides a further refinement to improve the relevance of the selected information.

Remember that enabling reranking can lead to more precise and relevant responses, but it may slightly increase the processing time for each query (usually up to a second).

The current reranking model is based in the United States. Enabling reranking may breach data residency requirements for users who require their data to be processed solely within the European Union (EU). If you have strict data residency requirements and need to ensure that all processing occurs within the EU, it is recommended to keep reranking disabled.

Answer Length

The Answer Length setting allows you to customize how verbose or concise your chatbot's responses should be. You can adjust this setting to:

  • Short: Generate brief, to-the-point answers that provide essential information quickly
  • Medium: Provide moderate-length responses with a good balance of detail and brevity
  • Long: Create comprehensive responses that thoroughly explain concepts with examples and context

Choose the length that best matches your users' needs and the complexity of your documentation.