{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "fsdatalab-quail--extract-answers-from-text-column",
 "repo": "fsdatalab/quail",
 "repo_url": "https://github.com/fsdatalab/quail",
 "repo_slug": "fsdatalab-quail",
 "title": "Extract answers from a text column with AI.EXTRACT",
 "page_title": "How to extract answers from a text column with AI.EXTRACT with Quail",
 "summary": "Pull a short answer to a question out of each row's text in one SQL query.",
 "who": "An analyst who needs a specific detail, such as the actor a reviewer names, pulled from many free-text rows.",
 "problem": "Reading each text row to find one fact does not scale, and regular expressions miss varied wording.",
 "outcome": "A table with one extracted answer per row, produced by a single SQL query run on your GPU.",
 "steps": [
  "Run `uv pip install quail-engine` to 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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "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.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "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)"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/fsdatalab-quail/extract-answers-from-text-column/",
 "md": "https://dedupedai.com/use-cases/fsdatalab-quail/extract-answers-from-text-column/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/fsdatalab-quail--extract-answers-from-text-column.json",
 "api_version": "v1"
}
