Knowledge search
Knowledge search lets the user ask a question in natural language and get an answer written by the AI, based only on the documents of the base, and not on the general knowledge of the model.
The user does not get a list of documents to open, but an answer already written, drawn from their content. The retained documents are chosen by meaning similarity with the question, within the limits of what the user is allowed to see: the room, the views and the filters applied to them bind the search.
The search always returns at most 25 results.
Setting up the AI service is described on the Mistral integration page.
Enable knowledge search: makes the feature available to the users.
Embeddings
To perform this kind of search, a vectorization operation is needed, which indexes the content by its meaning instead of its raw text.
- Server access configuration: server access module that holds the location of the service and its authentication information, centralized for every application. It must hold the configuration of an AI server.
- A.I. model: AI model chosen in the list.
- Maximum tokens supported by this model: limit of the selected engine, retrieved automatically.
- Size of a vectorized text chunk (in tokens): the documents to vectorize are split into text chunks measured in tokens. A token stands for about 4 characters in French and 5 in English. Smaller chunks give a more precise search but increase the stored volume. 1024 tokens per chunk is recommended. The value set here does not affect the documents already vectorized: to apply it to the existing documents, run the JobIndexContents.
Similarity search
Two algorithms can be used to look for the documents matching the question:
-
Complete (brute force): evaluates every vector of the base, at the cost of performance.
-
Approximate (HNSW): explores only part of the vectors, faster, at the risk of missing a small part of them.
-
Search algorithm: Complete or Approximate.
-
Similarity level: threshold past which a vector is judged relevant. The higher it is, the closer the results are to the question, but the fewer there are. Moderate, High or Very high.
Results reranking
Enable search results reranking: adds the reranking step described below.
Similarity search finds documents by semantic comparison, but it can sometimes return results of little relevance, in particular when documents deal with similar subjects.
To improve precision, Any can apply a reranking step on the results: an AI model reassesses the relevance of each document against the question by analyzing them together.
That model better understands the overall meaning of the question and the text, which ranks the most relevant results at the top of the list.
We recommend choosing a mistral-medium model to handle this part.
Answer generation
To generate the answer, Any passes to the AI the text extracted from the documents returned by the similarity search, ranked by relevance. The amount of text sent depends on the configuration below: Any sends as many documents as possible until it reaches either the defined number of tokens or the limit of the selected model.
- Server access configuration: server access module that holds the location of the service and its authentication information, centralized for every application.
- A.I. model: AI model chosen in the list.
- Maximum tokens supported by this model: limit of the selected engine, retrieved automatically.
- Limit the number of tokens sent: caps the size of the text sent to the AI.
- Maximum tokens sent: limit in tokens (cannot exceed the maximum supported by the engine).
- Configure temperature: sets the variability of the AI answers: high, it diversifies them. Low, it makes them more predictable.
- Temperature: number between 0 and 10 (7 by default).
- A.I. language: the language of the current user is used to communicate with the AI. The context and the instructions must therefore be configured in each language.
- Maximum words to the generated answer: length past which the answer is truncated.
- Context and instructions for A.I.: context passed to the AI. For instance: "Contents related to recruitment, payroll management, and customer registrations".
The "Test model" button opens a window to submit a text and get the result live, with the model and the module as configured.