botserver/docs/src/chapter-03/README.md

25 lines
949 B
Markdown
Raw Normal View History

## gbkb Reference
The knowledgebase package provides three main commands:
2025-11-23 13:46:55 -03:00
- **USE KB** Loads and embeds files from the `.gbkb/collection-name` folder into the vector database, making them available for semantic search in the current session. Multiple KBs can be active simultaneously.
- **CLEAR KB** Removes a knowledge base from the current session (files remain embedded in the vector database).
- **ADD WEBSITE** Crawl a website and add its pages to a collection.
**Example:**
```bas
2025-11-21 23:23:53 -03:00
' Add support docs KB - files from work/botname/botname.gbkb/support_docs/ are embedded
2025-11-23 13:46:55 -03:00
USE KB "support_docs"
2025-11-21 23:23:53 -03:00
' Add multiple KBs to the same session
2025-11-23 13:46:55 -03:00
USE KB "policies"
USE KB "procedures"
2025-11-21 23:23:53 -03:00
' Remove a specific KB from session
2025-11-23 13:46:55 -03:00
CLEAR KB "policies"
2025-11-21 23:23:53 -03:00
' Remove all KBs from session
2025-11-23 13:46:55 -03:00
CLEAR KB
```
2025-11-21 23:23:53 -03:00
The vector database retrieves relevant chunks/excerpts from active KBs and injects them into LLM prompts automatically, providing context-aware responses.