Skip to main content

Retriever mode

Retriever agents are sophisticated AI agents designed to provide comprehensive and accurate information by leveraging a wide range of knowledge sources. These agents are enhanced with document retrieval capabilities, internet search functionality, and the ability to use various functions for data access, chat interaction and html content display.

Key Features

  1. Document-Based Knowledge: Retriever agents can access and analyse a vast array of documents to provide informed responses leveraging ToothFairyAI Knowledge Hub.

  2. Internet Search Capability: When enabled, these agents can search the internet for up-to-date information.

  3. Function Integration: They can consume APIs and databases as data sources, allowing for dynamic and current information retrieval.

  4. Cross-Document Analysis: Agents can analyse multiple documents separately to cross-check and validate information from different sources.

  5. Step-by-Step Reasoning: When enabled, the agent explains its reasoning process step by step.

  6. Named Entity Recognition (NER) Enhancement: This feature allows the agent to use named entities in the response, improving the contextual relevance of answers.

  7. Image Retrieval from Documents: Agents can retrieve and display images from the accessed documents in the Knowledge Hub in their responses.

Knowledge Settings

  • Topics: Assign specific topics to the agent for targeted knowledge access.
  • Max history (1-10): Determines how many previous conversation turns the agent remembers for context.
  • Keywords for knowledge base query: Choose between keyword-based or full question-based document searches.
  • Max keywords (1-10): Set the maximum number of keywords for knowledge base queries.
  • TopK (1-20): Limit the number of results returned from knowledge base queries.
  • Doc TopK (1-20): Specify the maximum number of documents to extract from the initial query by document ID.
  • Min retrieval accuracy: Set the minimum confidence level for knowledge base query results.
  • Recency importance (0-5): Adjust the importance of document recency in query results.
  • Keywords importance (0-5): Set the weight given to keywords in knowledge base queries.

Internet Search Settings

  • Allow internet search: Enable or disable internet search capability.
  • Max search results: Set the maximum number of search results to return (applies to each enabled search mode).
  • Search Location: Set the location from which the internet search is conducted. The available locations are: Australia, Canada, New Zealand, United States and United Kingdom.
  • Search location: Specify a location to receive more relevant local results.
  • Search mode: Choose from search, news, videos, images, and shopping modes. Multiple modes can be combined.
  • Excluded domains: List domains to be excluded from internet search results.
  • Allow deep search: Enable in-depth searching of internet results (limited to top three results for search and news modes).

Functions Settings

Functions enable agents to access additional data sources through APIs and databases, enhancing their capabilities and knowledge base.

Types of Functions

  1. API Functions: Allow agents to interact with external APIs.
  2. DB Functions: Enable agents to query databases directly.
  3. Chat Functions: Provide conversational interfaces to data sources.
  4. HTML Functions: Allow agents to interact with web-based interfaces.

Function Hierarchy

  • Chat and HTML functions take precedence over API and DB functions when invoked.
  • All function types can be used in conjunction with Internet search and Knowledge Hub data sources.

Context Assignment

Functions can be assigned context to make them more aware of the specific scenario they're operating in. This context injection allows for more tailored and relevant function execution.

Available Context Types:

  • Customer: Provides customer-specific information.
  • Case: Includes details about the current case or ticket.
  • Chat: Incorporates information from previous conversation turns.

Examples of Context-Aware Function Execution

  1. Customer Support Scenario:

    • Context: Customer
    • Use Case: When handling a support inquiry, the function can automatically access the customer's account details, purchase history, or previous support interactions.
    • Example: getCustomerInfo(customerId) could return personalised data based on the current customer context.
  2. Ticket Resolution:

    • Context: Case
    • Use Case: When working on a specific support ticket, the function can pull relevant ticket information, including status, priority, and related issues.
    • Example: getTicketDetails(ticketId) could return comprehensive information about the current case being handled.
  3. Conversation-Aware Responses:

    • Context: Chat
    • Use Case: The function can use information from previous turns in the conversation to provide more accurate and relevant responses.

Advanced Features

  • Enhance answers with NER: Improve responses with named entity recognition.
  • Retrieve images from docs: Allow the agent to include relevant images from accessed documents in responses.
  • Multimodal capabilities: When enabled, agents can generate responses including images, charts, tables, and mind maps (available with Sorcerer and Mystica model families).

Use Cases

  1. Comprehensive Research: Gathering and synthesising information from multiple sources on complex topics.
  2. Up-to-date Information Retrieval: Providing current information by combining document knowledge with internet search capabilities.
  3. Data Analysis: Accessing and interpreting data from various sources, including APIs and databases.
  4. Fact-Checking and Validation: Cross-referencing information across multiple documents and sources.
  5. Visual Information Sharing: Retrieving and sharing relevant images and charts to support explanations.
  6. Customised Knowledge Access: Tailoring responses based on specific assigned topics and knowledge areas.

Limitations and Considerations

  • The accuracy of responses depends on the quality and up-to-date nature of the knowledge sources and internet search results.
  • Internet search capabilities may be subject to external service limitations or changes.
  • The agent's performance can be affected by the specificity of assigned topics and the quality of knowledge base setup.
  • Deep search and cross-document analysis may increase response time.

Best Practices

  1. Clearly Define Topics: Assign relevant and specific topics to ensure the agent accesses the most appropriate knowledge.
  2. Optimise Knowledge Settings: Adjust settings like TopK and retrieval accuracy to balance between comprehensive and focused responses.
  3. Use Internet Search Judiciously: Enable internet search when up-to-date or supplementary information is crucial. Modern large languge models can often already answer most questions that require relatively up to date information. Feel free to research on the knowledge cut-over of each model you use often for this kind of tasks.
  4. Leverage Cross-Document Analysis: Enable this feature for topics requiring validation from multiple sources.
  5. Monitor and Update Knowledge Base: Regularly review and update the agent's knowledge sources to maintain accuracy.
  6. Utilise Function Integration: Set up relevant APIs and database connections to enhance the agent's data access capabilities.
  7. Enable NER and Image Retrieval: Use these features to enrich responses with contextual entities and visual information when appropriate.

By leveraging these powerful features and following best practices, Retriever agents can provide highly informative, accurate, and contextually relevant responses across a wide range of topics and use cases.