Updated on 2025-08-22 GMT+08:00

Experiencing KooSearch Document Q&A

With a knowledge base that contains the necessary knowledge in it, you can try the Document Q&A service on the KooSearch Experience Platform.

Prerequisites

  • KooSearch has been enabled.
  • A knowledge base has been created, and knowledge has been uploaded to it.
  • The knowledge base that you plan to use to experience the Document Q&A service is Enabled.

Accessing the KooSearch Console

  1. Log in to the CSS management console.
  2. In the navigation pane on the left, choose KooSearch > KooSearch Document Q&A.
  3. Select a document Q&A service created earlier, and click Q&A in the Operation column to switch to the KooSearch console.

Selecting a Knowledge Base

  1. On the KooSearch console, choose Experience Platform from the left navigation pane.
  2. Click in the upper right corner. In the displayed Sources dialog box, select a knowledge base and click OK. You can select a single knowledge base or select multiple ones after toggling on .

    KooSearch will search for answers in response to your questions in the selected knowledge base.

Experiencing Document Q&A

  1. In the upper right corner of the Experience Platform, click Q&A.
  2. Enter your question in the search box.
  3. On the left end of the question box, click , and click to search by tag, document, or table.
    • By Tag: Filter documents by document tags. The answer will only come from documents that contain the specified tags.
    • By Document: Select specific documents. The answer will come from the selected documents only.
    • By Table: When the question matches an existing table (Excel file), NL2SQL is triggered. The answer will come from the selected table only.

      For tabular Q&A, you are advised to specify the table name and column name in the question to improve accuracy.

  4. Click , and check the generated answer.
    Figure 1 Experiencing Document Q&A

    Table 1 Icons

    Icon

    Description

    Click to agree with the answer.

    Provide feedback or suggestions. Click to disagree with the answer. In the displayed dialog box, give your feedback on three perspectives: On question, On search, or On answer. Or provide your own answer in the text box below. Then click Submit.

    Copy the answer.

    Refresh content.

    Check the reference sources of the answer. In the reference list, click Full text to check the original document.

    NOTE:

    The system currently cannot properly display content from a DOCX document that has multiple columns.

  5. In the upper right corner of the Q&A page, the Settings and Clear History buttons are available.
    Figure 2 Buttons

    • Settings: Click Settings to modify related settings in the middle of a dialog with KooSearch. For more information about the parameters, see Configuring Q&A Settings.
    • Clear History: Click Clear History to clear the current dialog page. After clearing, a new dialog begins by default.

Configuring Q&A Settings

  1. On the Experience Platform page, click in the upper right corner. On the Configure page, configure the Q&A settings.
    Table 2 Recall policies

    Parameter

    Description

    Text Recall Policy

    Recall policy used for document searches. Options include semantic search, hybrid search, and keyword search.

    • Semantic search: Queries document chunks using vector search, and FAQs using query-to-query similarity-based search.
    • Hybrid search: Queries document chunks using the hybrid of vector search and keyword search, and FAQs using query-to-query similarity-based search.
    • Keyword search: Queries document chunks using inverted index search, and FAQs using query-to-query similarity-based search.

    Top-k recalls for semantic search: the number of recalls for each semantic search. If not specified, the default value 50 is used.

    Top-k recalls by keyword: the number of recalls for each keyword-based search.

    FAQ recalls: Obtains the similarity score through query-to-query similarity-based search and recalls the specified number of results. The default value is 2.

    Refined Ranking: filters and ranks search results before displaying them.

    Reranking is enabled by default. Note that when reranking is disabled, the relevance score ranges from 0 to 200. When it is enabled, this score ranges from 0 to 1. After enabling or disabling reranking, you must reconfigure the relevance threshold and reference relevance threshold. Otherwise, relevance-based result filtering will be affected.

    • Search Page Correlation Threshold: Only search results with a relevance score higher than the correlation (relevance) threshold will be displayed on the search results page.
    • Q&A Reference Correlation Threshold: The search results with a relevance score higher than the correlation (relevance) threshold will be submitted to the LLM for summarization.

    FAQ Recall Policy

    Recall policy used for FAQ searches.

    FAQ Recall Similarity Threshold: Obtains the similarity score through query-to-query similarity-based search and recalls results based on a similarity threshold. The default value is 0.8.

    FAQ Relevance Threshold: FAQs with a relevance score exceeding this threshold will be provided as answers directly. There is no need for the LLM to summarize the answer. Default value: 0.95.

    Table 3 Q&A settings

    Parameter

    Description

    NLP model

    Select an NLP model.

    Query Rewriting

    User queries are split and rewritten based on the multi-turn dialog. The rewritten queries are used for document retrieval only.

    Intent Classification

    Select an intent category.

    • Human interaction: What's your name?
    • Weather: What is the weather today?
    • Industry knowledge: Prefix matching is recommended, allowing for future extensions. For example, "Industry knowledge-Finance: What is the definition of loan restructuring?"
    • Industry knowledge-Manufacturing: What is the current stage of China's manufacturing?
    • Industry knowledge-Healthcare: What types of medical errors are there?
    • Industry knowledge-Government: What are the main guidelines in the New-Generation Artificial Intelligence Development Plan issued by the State Council of China?
    • Industry Knowledge-Finance: How is the stock market doing today?
    • NLP task: Please write an email of about 460 words asking for details about a new IT project. This email will be sent to the company's IT project manager.
    • General knowledge: What is the difference between soybean juice and soy milk?
    • Chit-chat: It's so exhausting taking a long-distance train.
    NOTE:

    Questions with identified intents are answered by an LLM directly. For questions with unidentified intents, they will first be searched in the knowledge base. Then, the LLM summarizes the results to generate answers.

    Refuse Certain Questions

    When enabled, you can set Response When Refusing a Question. If no answer is found for a question, this preset response is returned.

    General Prompt

    • Use scenarios: non-RAG. In non-RAG scenarios, there are no search processes. The generative AI model generates answers directly.
    • Elements: The prompt must contain the question, task instructions, and other requirements.
    • Usage: The prompt can be customized. If not specified, the default prompt is used. Refer to the format of the default prompt when you write a custom prompt.

    Custom Prompt for Question Generation

    You are an expert in question extraction. Please summarize and generate up to {0} high-quality questions based on the content of the document text provided below. The requirements are as follows: (1) The generated questions should be answerable based on the provided document text. (2) Present the questions in a conversational and personalized manner, suitable for a knowledge base Q&A format. (3) Avoid revealing that your answer is based on some reference material. (4) Make sure the questions are diverse in terms of the knowledge points they cover. (5) Avoid overly simple questions; maintain high quality in the generated questions. Document text: {1}

    Note: {0} and {1} are placeholders in a fixed sequence. The retrieved document content will be filled to the location indicated by {1}. The format is as follows: [Document name]: {title1}
    [Document content]: {content1}
    [Document name]: {title2}
    [Document content]: {content2}
     ...... 
    The number of questions generated will be filled to the location indicated by {0}.

    Custom Prompt for Answer Generation

    You are an expert in question extraction. Please summarize and generate up to {0} high-quality questions based on the content of the document text provided below. The requirements are as follows: (1) The generated questions should be answerable based on the provided document text. (2) Present the questions in a conversational and personalized manner, suitable for a knowledge base Q&A format. (3) Avoid revealing that your answer is based on some reference material. (4) Make sure the questions are diverse in terms of the knowledge points they cover. (5) Avoid overly simple questions; maintain high quality in the generated questions. Document text: {1}

    Note: {0} and {1} are placeholders in a fixed sequence. The retrieved document content will be filled to the location indicated by {1}. The format is as follows:
    [Document name]: {title}
    [Document content]: {content}
    The number of questions generated will be filled to the location indicated by {0} before answers are generated.
    Table 4 Model Settings

    Parameter

    Description

    Text diversity (top_p)

    Controls the diversity of the generated text by changing how the model selects tokens for output. A higher value means a wider choice of tokens and hence a higher text diversity. The default value is 0.1.

    Maximum new tokens in the output (max_tokens)

    Maximum output tokens generated by the model. With a larger value, the reply can be longer and maybe more comprehensive. With a smaller value, the reply is more brief. The default value is 2048.

    NOTE:

    If you select NLP Model - Ascend Cloud to provide Q&A, you are advised to set this parameter to 512.

    Diversity of non-RAG model's output (temperature)

    A higher temperature increases the randomness and diversity in the output of a non-RAG model. The default value is 0.6.

    Diversity of RAG model's output (temperature)

    A higher temperature increases the randomness and diversity in the output of a RAG model. The default value is 0.3.

    Text repetition penalty (presence_penalty)

    Penalizes tokens that already appear in the generated text. The higher this value, the more diversified words and phrases in the generated text. The default value is 0.

  2. Click OK.