Build a RAG dataset over 10-K filings
Uses Full-text search
Retrieval-augmented generation needs two things: the right documents, and the right passages from them. Full-text search does the first part directly and hands back matching passages and the filing index link for each, which is where the full document lives.
Find the filings and passages
Which 10-Ks talk about artificial intelligence?
AI turns up in 10-Ks as a product, a cost, and more and more as a risk factor. The passages show which.
curl -X POST https://www.quantisnow.com/api/v1/full-text \
-H "Authorization: Bearer $QUANTISNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "\"artificial intelligence\" OR \"generative AI\"",
"formTypes": [
"10-K",
"10-K/A"
],
"sort": "filedAt:desc",
"size": 5,
"facets": true
}'80 matches, first 5 in 220 ms
...Failure to develop, validate, adopt, govern, or properly manage artificial intelligence ("AI") technology, its use and applications, including AI used in products, engineering, manufacturing, quality, regulatory, service...
...We harness data, digital platforms and artificial intelligence (AI)-enabled solutions to help clients operate more efficiently, safely and intelligently, while enhancing resilience and supporting more sustainable outcomes...
...In addition, the rapid evolution and increased adoption of artificial intelligence, machine learning, data science and similar technologies (collectively, "AI") may intensify our cybersecurity risks (e.g., AI used to develop...
...The threat landscape is constantly evolving as threat actors become increasingly sophisticated in using techniques and tools - including artificial intelligence and other emerging technologies - for malicious purposes....
The JSON it returned
{
"total": {
"value": 80,
"relation": "eq"
},
"took": 220,
"data": [
{
"id": "0001681622-26-000086",
"kind": "filing",
"source": "SEC",
"accessionNo": "0001681622-26-000086",
"formType": "10-K",
"filedAt": "2026-11-23T16:40:29-05:00",
"cik": "0001681622",
"companyName": "Varex Imaging Corporation",
"ticker": "VREX",
"tickers": [
"VREX"
],
"items": [],
"description": "SEC Form 10-K filed by Varex Imaging Corporation",
"linkToFilingIndex": "https://www.sec.gov/Archives/edgar/data/1681622/000168162226000086/0001681622-26-000086-index.htm",
"quantisnowUrl": "https://www.quantisnow.com/insight/sec-form-10-k-filed-by-varex-imaging-corporation-6804221",
"score": null,
"highlights": [
"Failure to develop, validate, adopt, govern, or properly manage <em>artificial intelligence</em> (\"AI\") technology, its use and applications, including AI used in products, engineering, manufacturing, quality, regulatory, service"
]
},
{
"id": "0001628280-26-075495",
"kind": "filing",
"source": "SEC",
"accessionNo": "0001628280-26-075495",
"formType": "10-K",
"filedAt": "2026-11-23T16:13:24-05:00",
"cik": "0000052988",
"companyName": "Jacobs Solutions Inc.",
"ticker": "J",
"tickers": [
"J"
],
"items": [],
"description": "SEC Form 10-K filed by Jacobs Solutions Inc.",
"linkToFilingIndex": "https://www.sec.gov/Archives/edgar/data/52988/000162828026075495/0001628280-26-075495-index.htm",
"quantisnowUrl": "https://www.quantisnow.com/insight/sec-form-10-k-filed-by-jacobs-solutions-inc-6804018",
"score": null,
"highlights": [
"We harness data, digital platforms and <em>artificial intelligence</em> (AI)-enabled solutions to help clients operate more efficiently, safely and intelligently, while enhancing resilience and supporting more sustainable outcomes",
"In addition, the rapid evolution and increased adoption of <em>artificial intelligence</em>, machine learning, data science and similar technologies (collectively, \"AI\") may intensify our cybersecurity risks (e.g., AI used to develop",
"We use <em>artificial intelligence</em>, machine learning, data science and similar technologies in our business, and challenges with properly managing such technologies could result in reputational harm, competitive harm, and legal"
]
},
{
"id": "0000003545-26-000054",
"kind": "filing",
"source": "SEC",
"accessionNo": "0000003545-26-000054",
"formType": "10-K",
"filedAt": "2026-11-23T16:12:59-05:00",
"cik": "0000003545",
"companyName": "Alico Inc.",
"ticker": "ALCO",
"tickers": [
"ALCO"
],
"items": [],
"description": "SEC Form 10-K filed by Alico Inc.",
"linkToFilingIndex": "https://www.sec.gov/Archives/edgar/data/3545/000000354526000054/0000003545-26-000054-index.htm",
"quantisnowUrl": "https://www.quantisnow.com/insight/sec-form-10-k-filed-by-alico-inc-6804009",
"score": null,
"highlights": [
"The threat landscape is constantly evolving as threat actors become increasingly sophisticated in using techniques and tools - including <em>artificial intelligence</em> and other emerging technologies - for malicious purposes."
]
},
{
"id": "0001868941-26-000057",
"kind": "filing",
"source": "SEC",
"accessionNo": "0001868941-26-000057",
"formType": "10-K",
"filedAt": "2026-11-23T16:12:45-05:00",
"cik": "0001868941",
"companyName": "Fluence Energy Inc.",
"ticker": "FLNC",
"tickers": [
"FLNC"
],
"items": [],
"description": "SEC Form 10-K filed by Fluence Energy Inc.",
"linkToFilingIndex": "https://www.sec.gov/Archives/edgar/data/1868941/000186894126000057/0001868941-26-000057-index.htm",
"quantisnowUrl": "https://www.quantisnow.com/insight/sec-form-10-k-filed-by-fluence-energy-inc-6804007",
"score": null,
"highlights": [
"Our energy storage solutions and operational services are designed to help create a more resilient grid, from powering the next generation of <em>artificial intelligence</em> (\"AI\") driven data centers to unlocking the full potential",
"As electricity demand continues to increase, including from data centers and <em>artificial intelligence</em> (\"AI\") infrastructure, pressure on transmission systems and interconnection queues may continue to increase in certain regions",
"The law is also uncertain across jurisdictions regarding the copyright ownership of content that is produced in whole or in part by <em>generative AI</em> tools."
]
},
{
"id": "0001837240-26-000049",
"kind": "filing",
"source": "SEC",
"accessionNo": "0001837240-26-000049",
"formType": "10-K",
"filedAt": "2026-11-23T16:06:57-05:00",
"cik": "0001837240",
"companyName": "Symbotic Inc.",
"ticker": "SYM",
"tickers": [
"SYM"
],
"items": [],
"description": "SEC Form 10-K filed by Symbotic Inc.",
"linkToFilingIndex": "https://www.sec.gov/Archives/edgar/data/1837240/000183724026000049/0001837240-26-000049-index.htm",
"quantisnowUrl": "https://www.quantisnow.com/insight/sec-form-10-k-filed-by-symbotic-inc-6803836",
"score": null,
"highlights": [
"design, production or launch of our systems and products; • the failure to meet customers' requirements under existing or future contracts or customers' expectations as to price or pricing structure; • the internal use of <em>artificial</em>",
"<em>intelligence</em>, referred to as A.I., physical A.I., and machine learning tools that may expose us to heightened cybersecurity risks; • the use of emerging technologies like A.I., machine learning, and physical A.I. requiring",
"The increasing capabilities and use of <em>artificial intelligence</em> may heighten cybersecurity risks."
]
}
],
"facets": {
"formType": [
{
"value": "10-K",
"count": 79
},
{
"value": "10-K/A",
"count": 1
}
],
"month": [
{
"value": "2026-11",
"count": 74
},
{
"value": "2026-10",
"count": 6
}
],
"companyName": [
{
"value": "AMCON Distributing Company",
"count": 1
},
{
"value": "Adient plc",
"count": 1
},
{
"value": "Air Products and Chemicals Inc.",
"count": 1
},
{
"value": "Alico Inc.",
"count": 1
},
{
"value": "Apple Inc.",
"count": 1
},
{
"value": "Arrowhead Pharmaceuticals Inc.",
"count": 1
},
{
"value": "Ashland Inc.",
"count": 1
},
{
"value": "AutoZone Inc.",
"count": 1
},
{
"value": "Azenta Inc.",
"count": 1
},
{
"value": "BellRing Brands Inc.",
"count": 1
}
],
"source": [
{
"value": "SEC",
"count": 80
}
]
}
}Collect them in Python
import json, os, requests
API = "https://www.quantisnow.com/api/v1/full-text"
H = {"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"}
records, start = [], 0
while start < 500:
page = requests.post(API, headers=H, json={
"query": '"artificial intelligence" AND "risk"', "formTypes": ["10-K"],
"sort": "filedAt:desc", "size": 50, "from": start,
}).json()
for f in page["data"]:
for i, passage in enumerate(f["highlights"]):
records.append({
"id": f"{f['accessionNo']}-{i}",
"text": passage.replace("<em>", "").replace("</em>", ""),
"ticker": f["ticker"], "company": f["companyName"],
"filedAt": f["filedAt"], "source": f["linkToFilingIndex"],
})
start += 50
if start >= page["total"]["value"]:
break
with open("passages.jsonl", "w") as out:
for r in records:
out.write(json.dumps(r) + "\n")
print(len(records), "passages")Passages are up to three per filing, enough for a small index with sources. For whole documents, follow linkToFilingIndex to sec.gov and download the main document; the SEC asks for a User-Agent with your contact details and at most 10 requests a second. Keep the accession number on every chunk so each answer can cite its filing.
Or skip the index
If the goal is an assistant that answers from filings, an MCP connection gives it full_text_search directly, so it can search at question time instead of from a fixed index.
Related: Search 10-K text, Keyword search in Python.
Related guides
How to search the text of 10-K filings
Search annual reports for a phrase, with the 10-K/A, 10-KT, 20-F and 40-F variants included, and use proximity to skip risk-factor boilerplate.
How to search SEC filings by keyword in Python
Keyword and phrase search across SEC filings from Python with requests and pandas: paging, facets, retries on 429 and writing the results to CSV.
XBRL financial data API
Income statement, balance sheet and cash flow from 10-K and 10-Q XBRL, with the same field names for every company. Screen across companies or pull one company's history.
Real-time filings
Get new EDGAR filings a minute or two after the SEC accepts them, by polling the filings endpoint or holding open a Server-Sent Events stream.