Files
eveai_docs/docs/Specialists/q_a_rag_specialist.md
2025-12-11 14:43:16 +01:00

4.9 KiB

id, title, description, sidebar_label, sidebar_position
id title description sidebar_label sidebar_position
qa-rag-specialist Q&A RAG Specialist Understand how to configure and use the Q&A RAG Specialist for intelligent conversations Q&A RAG Specialist 2

Q&A RAG Specialist

Overview

The Q&A RAG Specialist enables intelligent question-answering interactions using your organization's specific information stored in Evie's Library. Whether supporting customers on your website or helping employees access internal knowledge, this specialist provides accurate, context-aware responses based on your documented information.

Structure

The Q&A RAG Specialist extends the base Specialist with specific configuration, arguments, and results tailored for question-answering:

classDiagram
    class Specialist {
        +id: Integer
        +name: String
        +description: Text
        +type: String
        +configuration: JSON
        +arguments: JSON
        +results: JSON
    }

    class QARagSpecialist {
        +configuration
        specialist_context: String
        temperature: Float
        +arguments
        language: String
        query: String
        +results
        detailed_query: String
        answer: String
        citations: Array
        insufficient_info: Boolean
    }

    Specialist <|-- QARagSpecialist

Configuration

Specialist Context

The context defines the specialist's identity and behavior. A well-structured context typically includes:

  1. Identity

    • The specialist's name
    • Role or position (e.g., company spokesperson)
  2. Reference Handling

    • How your company/product names might appear
    • Common variations or abbreviations
    • How to handle self-references
  3. Domain Clarity

    • Clear description of the business domain
    • Disambiguation from similar companies/products

Example context:

{
  "specialist_context": "You are Evie, the main spokesperson for 'Ask Eve AI'. 
    'Ask Eve AI' can be spelled in different ways (e.g. askeveai), can be 
    shortened to Evie, and can be referred to as 'you' (as you share the 
    same name as the product, and actually are an impersonation of the 
    product Evie). Ask Eve AI sells an advanced SAAS platform, also called 
    Evie, that enables companies to easily implement business cases based 
    on generative AI, mainly LLMs."
}

Temperature

Controls the balance between creativity and precision in responses:

  • Range: 0 to 1
  • Default: 0.3
  • Effect:
    • Lower values (closer to 0): More conservative, strictly adhering to source content
    • Higher values (closer to 1): More creative, potentially introducing more variation
    • Adjust based on your needs:
      • Increase if responses feel too rigid
      • Decrease if responses take too many liberties with the source material
    • Note: Higher temperatures increase the risk of hallucinations

Arguments

Arguments required for each interaction:

  1. language

    • Specifies the desired response language
    • Evie intelligently handles multi-language content
    • Can find relevant information across language barriers
    • Note: While Evie translates answers, it is not a document translation service
  2. query

    • The actual question from the end user
    • Will be processed considering session context

Results

The specialist returns structured results for each interaction:

  1. detailed_query

    • Enhanced version of the original query
    • Incorporates context from previous interactions
    • Helps maintain conversation coherence
  2. answer

    • The specialist's response to the query
    • Based on retrieved information
    • Formulated according to configuration settings
  3. citations

    • References to specific embeddings used
    • Traceable back to source document versions
    • Enables verification and source tracking
  4. insufficient_info

    • Boolean flag indicating information adequacy
    • true when library content insufficient for proper response
    • Helps monitor answer quality and identify knowledge gaps

Integration Notes

While the specialist provides structured arguments and results, these technical details are typically hidden from end users. Client interfaces (such as chat widgets) handle:

  • Submitting properly formatted arguments
  • Receiving and processing results
  • Presenting information in a user-friendly format

This abstraction allows for:

  • Clean user experiences
  • Consistent interaction patterns
  • Technical flexibility for integrators

Multi-language Capabilities

The Q&A RAG Specialist features advanced language handling:

  • Finds relevant content across languages
  • Provides responses in requested language
  • Maintains context across language switches
  • Intelligently translates responses while preserving meaning

For example, English questions can receive relevant information from Dutch documents, with responses properly formulated in English.


The next sections cover best practices, common use cases, and integration examples.