What are Bots?
Bots in Montag are a combination of all the settings discussed so far in this guide. They enable the interaction with an LLM through a chat-style in terface.
The settings combine:
- A namespace (which database to use for context)
- API Client for completions and embeddings
- The settings to use for those completions
- The settings to use for embeddings
- The prompts to use
- Which interface to expose the bot on (slack bot credentials)
- Which database connection to use to lookup the namespace
- What roles to apply to templates in the prompt
There are two additional settings which require more advanced understanding of how scripting works:
- Raw Prompt Hook: This is a script executed before the prompt is sent to the LLM, it is where you would enable more complex interactions with an LLM
- Raw Response Hook: This is a script that is run when the response is received from the LLM, for example if you wished to run an analysis on the appropriateness of the response or check for invalid data.
Both of these are user-defined scripts that you wish to run when the bot executes, the first is run on the raw prompt before it reaches the LLM, the latter is run on the response before it reaches the user.