DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to extract answers from a text column with AI.EXTRACT with Quail

Pull a short answer to a question out of each row's text in one SQL query.

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

  1. Run uv pip install quail-engine to install the package.
  2. Register your text table with Quail.DocumentProvider.from_table(table, id_col="id") inside a Quail.Session.
  3. In the SQL, select AI.EXTRACT(r.body, {'field': 'Your question about the text?'}) AS answer from the table.
  4. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer