# Knowledge Base

#### Q: What is the Knowledge Base?

A: The Knowledge Base stores your documentation, FAQs, guides, and instructions. The AI uses this information to answer questions in tickets.

#### Q: How do I add documents to the Knowledge Base?

A: You can add documents in two ways:

* /learn-form - Add knowledge manually (title, content, tags, continue response)
* /learn-from-doc - Upload files (.docx, .pdf, .txt, .md) up to 1MB per file

#### Q: What information should I include in knowledge base entries?

A: Include:

* Clear, descriptive titles
* Comprehensive content explaining the topic
* Relevant tags (comma-separated) for easier searching
* Optional continue response for multi-step processes

#### Q: How do I view all knowledge base entries?

A: Use /view-base to see all entries with numbering. Entries are paginated (20 per page).

#### Q: How do I modify a knowledge base entry?

A: Use /modify-base \<number> where the number is from /view-base. This opens a modal to edit title, content, tags, and continue response.

#### Q: How do I delete a knowledge base entry?

A: Use /delete-base \<number> to delete a specific entry, or /clear-base to delete all entries (admin only).

#### Q: What file types are supported for document uploads?

A: Supported types:

* Word documents (.docx)
* PDF files (.pdf)
* Text files (.txt)
* Markdown files (.md)
* Maximum 1MB per file

#### Q: How does the AI search the knowledge base?

A: The AI uses:

* Semantic search (understanding meaning)
* Keyword matching on titles, content, and tags
* RAG (Retrieval-Augmented Generation) to combine multiple documents
* Top 5 most relevant documents are used for context

#### Q: Can I have different knowledge bases for different servers?

A: Yes! Each Discord server (guild) has its own separate knowledge base. Documents added in one server don't affect other servers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ansari-labs.gitbook.io/ansari-labs/products/ai-powered-ticket-tool/faqs/knowledge-base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
