Prerequisites
- The Meibel Python SDK:
pip install meibel. See Installation. - Your API key in the
MEIBEL_API_KEYenvironment variable.
1. Get the dataset
Download the Social Security Administration’s national baby-name records. This is public-domain data; SSA blocks scripted downloads from its own site, so Meibel hosts a copy for this tutorial. The file has about 1.8 million rows, with columnsyear, name, sex, and count.
2. Create a datasource for the CSV
The datasource is the container the table will live in. Create an empty one to load into.3. Upload the CSV and wait for it to land
Uploads are asynchronous, so upload the file and then wait for it to finish before ingesting. Triggering ingestion before the upload completes would ingest nothing.4. Ingest into a queryable table
Ingestion registers the CSV as a table, one column per field, and infers each column’s type. It also generates a description for every column from the column’s own values, which the agent later uses to write accurate queries. Trigger it and poll until it completes (about 20 seconds for this file).Column descriptions are generated automatically, and you can refine them for clarity. Clear descriptions help the agent map a plain-language question to the right columns. See Managing datasource metadata.
5. Give an agent access to the table
Bind the datasource to an agent. The binding gives the agent a tool that queries the table, and instructions steer it toward using that tool for quantitative questions.6. Ask for exact numbers
Open a session and ask questions that only an exact computation can answer. Each one becomes a query the database runs over every row, so the totals are true totals rather than estimates.Why the answers are precise
Two things make this different from asking a model to read data. First, the model’s job is to translate the question into a query, not to tally the rows itself, so it does not approximate or lose track across a long file. Second, the query runs against the complete table, with no sampling and no retrieval of a subset, so an aggregate reflects the whole dataset. A question about totals or top-N returns the same answer the database would give a SQL analyst. This is the structured-data half of a datasource. For questions that live in prose rather than tables, an agent searches documents instead. A datasource can hold both, and an agent bound to it moves between them. See Datasources for how the two shapes work together.What you built
You turned a 1.8-million-row public dataset into a queryable table, connected an agent to it, and asked for exact figures in plain language. The agent turned each question into a query the database answered over every row.Datasources
How structured and unstructured data are queried and combined.
Managing Datasource Metadata
Refine column descriptions so queries stay accurate.
Sessions & Chat
Send messages, stream responses, and read session history.