The AI document generation system allows your agent to produce clean, crisp, nicely formatted documents and send them over to your end-user.
Table of Contents | ||
---|---|---|
|
Template Editor
The first step in making your AI sales-bot is to create your document template. To do this, you need to access the Document Template
tab:
...
Note! It doesn’t really matter what text you put into the the editor itself. All text contained within the bound element gets replaced by the contents of the variable. In this example, we used [square_brackets]
as filler text for the document template. You could have also used filler text like an Lorem Ipsum
paragraph. It doesn’t matter - the text gets replaced by the contents of the bound variable.
Here is an example title page where we have made several bindings:
...
Template Settings
At the bottom of the screen provides us a second tab that we can flip to:
...
Bingo! We have a generated document.
Document Generation Smart Chain
If you go to the Settings tab, you will see that one of the settings is labelled the Smart Chain Binding:
...
This must point to a smart chain binding, which in turn points to a smart chain that will generate all of the required data for the document. The smart chain is triggered with a conversation object, and so can run Conversational Prompts as needed to generate the required information for the document.
You can define smart chain bindings here:
...
On this document template, I set a binding and pointed it to my smart chain to generate my proposal, which was also given the same name.
The smart chain itself can take practically any form you want. The only requirement is that the last step of the smart chain is where the data is pulled from to fill in the document. So it must have fields that match the same field names you put into the Variable Binding
setting.
In this example, we used a Structured Output Prompt in order to generate a Proposal object with a format that matches the input fields we defined in our variable bindings.
...
When an AI agent goes to try and generate this document, it will run this prompt, which produces these output fields, and then those get filled into the document template. You can see this in action by going to the “Web Chat” and talking to your agent, and requesting that it either email or generate you the document at the end.
Note |
---|
Sometimes the main smart chain for your agent needs to be modified and explicitly prompted on when it is supposed to generate the document. This is particularly true if you are using the Intake module in combination with the Document Generation module. |
...