Search Results for

    Show / Hide Table of Contents

    Knowledge sources

    A knowledge source holds documents that the AI Assistant can search: a user guide, procedures, rules of a scheme, answers to frequent questions. When a question needs them, the assistant searches the sources of its assistant profile, answers from the passages it finds, and cites them. The answer marks each statement it took from a passage with a number, such as [1], and lists the passages under Sources.

    An answer from a knowledge source, with its sources

    There are two types of knowledge source:

    • Static documents: Markdown, text or HTML files that you upload in Casewhere Admin. The Casewhere AI service searches them itself, so you need nothing else.
    • Azure AI Search: an index you already have in Azure AI Search. Casewhere queries it with the user's claims as a security filter.

    In Casewhere Admin, navigate to AI > Knowledge Sources to manage them.

    The Knowledge Sources list

    Create a knowledge source

    1. In Knowledge Sources, click Create.
    2. In General, enter the Name and the Description, and choose the Type.
    3. Set the other settings of the type (see below) and click Save.
    4. Add the documents (static documents) or the search service (Azure AI Search).
    5. In Test, search the source with a question a user could ask.
    6. Tick the source in the Knowledge section of the assistant profiles that should search it.

    General

    The General section of a knowledge source

    Name Description
    Name The name of the source. The user can name it in a question, for example according to the caseworker guide, to make the assistant search it.
    Description What the source contains, as the assistant is told. The assistant decides from it when to search the source, so describe the content and the questions it answers.
    Type Static documents or Azure AI Search.
    Passages per search How many passages one search returns, from 1 to 20. Empty: 5.
    Search Static documents only. Keyword: the words of the question, Semantic: the meaning of the question or Hybrid: words and meaning (recommended with an embedding model).
    Embedding model Static documents only, for semantic and hybrid search: an embedding model connection.
    Tags Optional labels to filter the list.
    Active Active: the assistants of the profiles that offer it search it. An inactive source is skipped.

    Static documents

    In Documents, click Add files and choose the files: Markdown (.md, .markdown), text (.txt) or HTML (.htm, .html), read as UTF-8. Each file is saved at once. A document can hold up to 500,000 characters, and the documents of a source up to 2,000,000 together. The section shows how much is used.

    The Documents section of a knowledge source

    Each document has a Title and a Link, which the citations show. The title is taken from the first heading of the document (or the title of an HTML page), else from the file name. Click a title or a link to change it. A link must be an https:// address, for example the page where your users read the document. To remove a document, click its delete icon and confirm.

    How the documents are searched:

    • The AI service splits each document into passages at its headings and paragraphs. Each passage keeps the title of its document and the path of its headings, which the citation shows as its section.
    • Keyword search ranks passages by the words of the question. Words in titles and headings count more, inflected forms of a word match it (application and applications), and common words are left out.
    • Semantic search ranks passages by their meaning, so a passage that answers the question in other words is found too. Hybrid search combines both rankings, which usually works best. Both need an embedding model connection. The documents are embedded once, when the source changes, and each question when it is asked. If the embedding model fails, the search uses the words, and the test says so.
    • Markdown is read as text: heading ids, a table of contents, comments and HTML tags are left out, an image keeps its alt text, and a long table is split between its rows, each part with the header of the table.
    Tip

    Write documents for the assistant as you would for a new colleague: one topic under each heading, the terms your users use, and short paragraphs. A heading that says what its section answers helps both searches.

    Azure AI Search

    The Azure AI Search section connects the source to an index of your search service.

    Name Description
    Endpoint The address of the search service, for example https://<service>.search.windows.net.
    Index The name of the index.
    API key A query key of the search service is enough. Like the key of a model connection, it is stored encrypted, never shown again and never leaves the environment.
    Query type Keyword, Semantic, Vector or Hybrid (keyword and vector). Vector and hybrid queries use the index's own vectorizer to turn the question into a vector, so the index needs one.
    Semantic configuration The semantic configuration to rank with. Empty: the index's default.
    Vector fields For vector and hybrid queries: the vector fields of the index, separated by commas, for example contentVector.
    Fields of a passage The index fields that hold the key of a passage (Id), its Text, its Title, a Link to the original (https://) and a Page or section.
    Security filter An OData filter added to every search (see below).

    Security filter

    The security filter decides which documents of the index a user may find. In the filter, {claim:type} becomes the values of that claim of the signed-in user, separated by commas. For example, with an index whose documents list the groups that may read them:

    groups/any(g: search.in(g, '{claim:groups}'))
    

    Put a placeholder inside a quoted text, as above. A claim value can then never change the filter itself: a source whose filter has a placeholder outside quotes is not searched at all.

    Without a security filter, every user of a profile that offers the source can find every document of the index.

    Test

    In Test, type a question a user could ask and click Search. The AI service searches the saved source once and shows the passages the assistant would get, how long the search took and how it ran (by keywords, by meaning, or both). The security filter is not applied in a test.

    The test of a knowledge source: the passages a question finds

    Delete a knowledge source

    Select the source and click Delete. Its documents and API key are deleted too, and the assistant profiles no longer search it.

    See also

    • Assistant profiles: choose the sources a profile searches.
    • Use the assistant: how users see the sources of an answer.
    In This Article
    Back to top Generated by DocFX