> ## Documentation Index
> Fetch the complete documentation index at: https://docs.libraria.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Answer

> Enhanced matching accuracy to prevent hallucinations from your Libraria AI Chatbot

## How do I create a custom answer?

1. Go to the **Knowledge Base** of the Library you want to add a custom answer to.

2. Click on the **Custom Answers** tab.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/add-docs-1.png" alt="Open Custom Answers" />
</Frame>

3. Click `Add a Custom Answer` button.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/add-docs-2.png" alt="Add Custom Answer" />
</Frame>

A window will appear for you to add your custom answers to.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/add-docs-3.png" alt="Add Custom Answer Window" />
</Frame>

There are two ways to create a custom answer:

#### Libraria's editor

In the **Manual** tab you can fill out the fields for setting up your custom answers.

1. The *required* fields in the form are:
   * The `question` field is where you will enter the question you want to have a custom answer to.
   * The `answer` field is where you will enter the answer to the question you set.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/manual-1.png" alt="Manual Custom Answer 1" />
</Frame>

2. There are additional *optional* fields you can fill out that can be included in your custom answer:

   * The `URL Snippet` is a field where you can put a link that can be included in your custom answer.
   * The `Photo Snippet` is a field where you can put an image that can be included in your custom answer.

   These fields are *optional* and can be left empty if you do not want to include them in your custom answer.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/manual-2.png" alt="Manual Custom Answer 2" />
</Frame>

3. There are also two optional checkboxes in the editor:

   * When `Return directly` is checked, this option instructs the system to deliver the custom answer directly to the user without further processing. The chatbot will output exactly what you entered in the **answer** field.
   * When `Only use this document when matched` is checked, this option ensures that the document or content is considered for generating a response only when it closely matches the user's question.

   Check the boxes if you want to include these options in your custom answer.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/manual-3.png" alt="Manual Custom Answer 3" />
</Frame>

4. Click `Submit` to save your custom answer.

#### In Bulk via CSV

In the **Bulk Import Custom Answers with CSV** you can upload a CSV file to create multiple custom answers at once.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/bulk-1.png" alt="Bulk Custom Answer 1" />
</Frame>

1. The CSV file is *required* to have the following columns:

   * `question` column should contain the question you want to have a custom answer to.
   * `answer` column should contain the answer to the question you set.

   *Optional* columns it can contain are:

   * `url` column where you will enter a link that can be included in your custom answer.
   * `id` column where you will enter the ID of the custom answer you want to create.

   Each row in the CSV will be considered as a document.

<Note>
  If you add an `id` column, it will be used to update existing documents with the same id. If you do not add the column, new documents will be created.
</Note>

2. Upload your CSV file by either clicking on the **Drag and drop** area or dragging your file into the area.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/bulk-2.png" alt="Bulk Custom Answer 2" />
</Frame>

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/bulk-3.png" alt="Bulk Custom Answer 3" />
</Frame>

3. There is an optional checkbox:

   * When `Only use this document when matched` is checked, this option ensures that the document or content is considered for generating a response only when it closely matches the user's question.

   Check the box if you want to include this option in your custom answer.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/bogpad/images/adding-documents/custom-answer/bulk-4.png" alt="Bulk Custom Answer 3" />
</Frame>

4. Click `Submit` to save your custom answers.

## Why should I Create Custom Answers?

<Note>
  TLDR: If you want to increase accuracy of your AI chatbot for a particular query, create a custom answer.
</Note>

Custom Answers are the most targeted and powerful way to answer a user’s questions. Use this if you want high accuracy results and your AI to answer a particular user’s question.

When you elect to create a custom answer, Libraria does some backend work to improve the matching and ranking of similarity to the user’s question.
