SmartDocumentAdapter
Uses a document as the knowledge source for a conversation, so users can ask questions about its contents.
Attaches to ChatBox + document
Attach a document and a ChatBox, and the adapter grounds every answer in that source. Users ask in plain language; responses come back drawn from the document rather than the model's general knowledge.
It is the building block for contract Q&A, policy lookups and manual assistants — anywhere the answer must come from a specific file.
Ingestion runs through the hub's vectorization pipeline, so large files are split, embedded and retrieved passage by passage rather than stuffed into the prompt. That keeps answers sharp and token costs flat even for hundred-page sources.
What it gives you
- Grounds responses in a supplied document.
- Conversational interface through a ChatBox control.
- Keeps answers tied to the source material.
Use it for
- Contract and policy Q&A for staff and customers
- Product-manual assistants inside support screens
- Compliance lookups grounded in the official text
Like every adapter, it runs through a SmartHub and inherits its SmartEndpoint — switching the model or provider never changes this code.
var hub = new SmartHub(this) { Endpoint = endpoint };
var docChat = new SmartDocumentAdapter {
ChatBox = chatBox1,
DocumentPath = @"C:\policies\handbook.pdf"
};
// Ask: "How many vacation days do new hires get?"