Who it is forAn analyst who needs a specific detail, such as the actor a reviewer names, pulled from many free-text rows.
The problemReading each text row to find one fact does not scale, and regular expressions miss varied wording.
The outcomeA table with one extracted answer per row, produced by a single SQL query run on your GPU.
What you need first
- Python 3.12
- An NVIDIA CUDA GPU from the supported list (for example H100 SXM)
- uv installed to run the pip install command
- A table of text rows (for example reviews with an id and a body column)
Steps
- Run
uv pip install quail-engineto install the package. - Register your text table with Quail.DocumentProvider.from_table(table, id_col="id") inside a Quail.Session.
- In the SQL, select AI.EXTRACT(r.body, {'field': 'Your question about the text?'}) AS answer from the table.
- Run the query with session.sql(sql, dialect="bq").collect() and print the result.
Prompt for your agent
Use the Python package quail-engine (import quail) from the repo fsdatalab/quail to run AI.EXTRACT over the text column <text_column> of the table <table_name> with the question <question>. Output a table of id and extracted answer. Verify that every id in the input appears in the output.
Caveat. The README shows AI.EXTRACT in an example but does not describe how empty or unclear answers are returned, so check outputs on a few rows first.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for fsdatalab/quail and "Extract answers from a text column with AI.EXTRACT"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer