Knowi Documents allows you to leverage Knowi’s AI capabilities to extract answers to questions from your documents (pdf, docx, etc.) and store them in a structured format as a dataset.
This tool connects to the files you’ve uploaded via the Document AI, enabling you to store questions and answers from your documents (Ask Question Mode) and even extract the values of specific fields (Get Data from Documents Mode) and save them in a tabular format. Once the dataset is created, it can be utilized across Knowi, just like any other dataset.
Add Knowi Documents as a Datasource
1. Upload your documents in the Document AI before you connect your documents as a datasource.
3. Click on the NEW DATASOURCE+ button from the top right corner of the interface.
4. Select Knowi Documents.
5. Name the document datasource.
Steps 2 through 5
5. (Optional) Use the Access Control List (ACL) button to specify which documents are included in the dataset.
- Separate datasets can be created for different document groupings.
- It is possible to explicitly include or exclude specific documents, or apply a regex pattern to match the desired file names.
Using the ACL to only include contracts in the "Contracts" datasource.
6. Click on the Test Connection to confirm a successful connection to the datasource, hit the Save button, and start Querying.
Querying your Documents
Start a New Query
Select NEW QUERY + in the top right corner of the queries page.
Choose the Datasource
Select your newly created Knowi Documents datasource from the drop down menu. It may have a different name if you renamed the datasource upon creation.
Select a Mode
Knowi Documents provides two modes for querying your documents:
- Ask Question: This mode lets you ask a question about the contents of your documents, similar to the Document AI chatbot, however here the answer is recorded into a table. The question, answer, and source, are all included in a single row of a dataset.
- Get Data from Documents: This mode extracts specific field values from your documents. You can prompt the AI to search for specific values and input those values into a column of your choosing.
How to select your mode in the query builder:
Mode: Ask Question
The "Ask Question" mode allows you to ask a question of your Knowi Documents using natural language. It operates similarly to the AI assistant chatbot in the Document AI, the main difference being the response is recorded into a Knowi dataset. Ask a question related to your document, and the AI provides an answer based on the content it extracts. This response is delivered in a single row, regardless of how many questions you ask.
Inputs:
- Ask Question: Write your question in natural language, providing as much or as little context as you’d like. You can include single or multi-part questions in this field.
- Cloud9QL Transformations: (Optional) Apply Cloud9QL transformations to the query result.
Step 1: Fill in the required inputs parameters in the query builder.
- In this example we've asked "What is the date of the midterm exam for the calculus class?" of a Knowi Documents datasource that includes Syllabi documents.
Step 2: Select "Preview" to review the output and ensure it meets your needs. If necessary, go back to Step 1 to adjust the inputs and refine the results.
- The output of "Ask Question" mode will always include three columns (question, answer, and sources) and one row. If you ask multiple questions, they will all be answered together.
Mode: Get Data from Documents
In the "Get Data from Documents" mode, the AI extracts structured data from your documents and organizes it into a table with custom column names. Simply ask questions and specify the field names for the table output, and the AI will generate the requested data.
Inputs:
- File Name Filter: (Optional) Filter the available files by typing here to limit the selection.
- Details Depth: Enter a value between 0 and 20 to control the amount of information retrieved—lower values are better for simpler queries.
- Ask Question: Ask one or more questions about the document's content.
- Field Name Prompt: Define the column names for the output table, and optionally include formatting details like field types or date formats. This is a freeform text section, so there is no required structure for the prompt.
- Cloud9QL Transformations: (Optional) Apply Cloud9QL transformations to the query result.
Step 1: Fill in the required inputs parameters in the query builder.
Step 2: Select Preview to review the output and ensure it meets your needs. If necessary, go back to Step 1 to adjust the inputs and refine the results.
Step 3: Your data might need additional post-processing. This can be done using the drag and drop editor in the Preview view, or in the Cloud9QL Transformations section.