Quickstart
Create a document knowledge base or a database knowledge base in MariaDB Cloud AI Retrieval with the default settings, and run your first query.
This quickstart creates a knowledge base with the default settings and runs a first query. It has two sections: one for a document knowledge base, which answers questions about files that you upload, and one for a database knowledge base, which answers questions about the data in a MariaDB service. For every option and the reasons behind the defaults, see Document Knowledge Bases and the other pages in this section.
Before You Begin
You need a MariaDB Cloud account and a role that can create knowledge bases. The Viewer role cannot.
Knowledge bases run on AWS.
Create a Document Knowledge Base
In the portal, select AI Retrieval in the navigation, and then Create Knowledge Base.
For Type, select Document Knowledge Base.
Enter a Name.
Leave AWS and the region as they are.
Under Vector Store Configuration, select Auto-provision new service. MariaDB Cloud creates a MariaDB Serverless service to store the vectors. To use an existing Provisioned or Serverless service instead, select Use existing service.
Select Create Knowledge Base.

The knowledge base shows the status Provisioning. This usually takes a few minutes.

When the status is **Ready**, the knowledge base is ready for documents.
The knowledge base uses the default embedding model and generation model, and the reranker is on. You do not need to change them to continue.
Upload a Document
On the knowledge base page, select Upload Documents.
Select a file, such as a PDF, a Word document, or a Markdown file, and select Next. A file can be up to 50 MB.
Leave the parsing and chunking options as they are, and select Upload.

The document appears in the Documents list. Wait until its status is Ingested. The Chunks column then shows how many chunks the document produced.

Run a Query
Select Test.
On the Retrieve & Generate tab, enter a question about your document, and select Test Query.
The answer cites the chunks of your document that it uses. The Retrieve tab shows the matching chunks without a generated answer.

To call the knowledge base from an application, see Connect Your Application.
Create a Database Knowledge Base
A database knowledge base reads the tables of a MariaDB service that already holds your data.
Select AI Retrieval in the navigation, and then Create Knowledge Base.
For Type, select Database Knowledge Base.
Enter a Name.
Under Datasource, select your service. The hostname, the port, and the credentials of the service are filled in, and you can change them.
Select Fetch schemas, and select the Schema that holds your tables. If the list is empty, enter the schema name.
Under Tables, all tables of the schema are included. Clear the check box of a table to leave it out, or expand a table to leave out some of its columns.
Select Create Knowledge Base.
AI Retrieval connects to the database and builds the semantic map automatically, from the tables that the user can see. You do not need to do anything. Wait until the knowledge base shows Ready.
Select Test, and ask a question about your data.



For access requirements, such as the IP allowlist and restricting what the knowledge base can read, see Access and Security.
Next Steps
Document Knowledge BasesParsing and ChunkingAccess and SecurityThis page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

