Skip to main content

Talk to SEC filings with AI

Project description

tenk banner

tenk

Talk to SEC filings with AI

Ask questions about 10-K and 10-Q filings, get answers with citations

Python License: GPL v3 Rallies.ai

What is tenk?

tenk lets you have a conversation with SEC filings. Instead of manually reading through hundreds of pages of 10-K and 10-Q reports, just ask questions in plain English and get answers with direct citations to the source.

tenk demo

Why not just use ChatGPT?

You could copy-paste filings into ChatGPT, but:

  • 10-Ks are 100+ pages - you can't paste them all
  • You definitely can't paste multiple filings to compare companies
  • You'd have to manually find and download each filing first

tenk automates all of that. It fetches filings from SEC EDGAR, indexes them locally, and lets you query across multiple filings at once.

Features

  • RAG over SEC filings with a local vector database (10-K, 10-Q)
  • Auto-downloads filings from SEC EDGAR
  • Citations with links to source documents
  • Stock data via Yahoo Finance
  • Web search for data not in filings
  • Excel generation for tables and financial models
  • Export answers to PDF, DOCX, or Excel
  • Conversation memory with auto-summarization

Requirements

  • Python 3.10+
  • OpenAI API key (set OPENAI_API_KEY environment variable)

Installation

pip install tenk

Or from source:

git clone https://github.com/rallies-ai/tenk.git
cd tenk
pip install -e .

Usage

Interactive mode:

tenk

One-shot mode:

tenk "What are Apple's main risk factors?"

Examples

> What are NVIDIA's revenue segments?

> Compare AAPL and MSFT gross margins for 2024

> What does Tesla say about competition in their latest 10-K?

> Create an Excel file with Amazon's quarterly revenue for the past 2 years

How it works

  1. Check available filings - Queries SEC EDGAR to see what's available
  2. Download & index - Downloads filings and chunks them into a local vector database
  3. Semantic search - Finds relevant passages using sentence-transformers
  4. AI analysis - Generates answers with citations
  5. Export - Optionally export to PDF, DOCX, or Excel

Configuration

Config file is at src/config.yaml:

model:
  name: gpt-5.2
  max_turns: 50

search:
  top_k: 10
  chunk_size: 3000
  chunk_overlap: 500

embeddings:
  model: all-MiniLM-L6-v2

edgar:
  identity: "Your Name your@email.com"  # Required by SEC EDGAR

database:
  path: db/filings.db

exports:
  dir: exports

Note: SEC EDGAR requires a valid user-agent identity. Update the edgar.identity field with your name and email.

Data Storage

  • Filings database: db/filings.db (DuckDB)
  • Exports: exports/ directory

Both are created automatically in your current working directory.

License

GPL-3.0 - see LICENSE


Built with ❤️ by Rallies.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tenk-0.1.0.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tenk-0.1.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file tenk-0.1.0.tar.gz.

File metadata

  • Download URL: tenk-0.1.0.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for tenk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ae56a1cfba059e49f854d89d0d8c12566be3b5613cbc4d3c408a07c37e3b0ee
MD5 bb3591049059aad6f2c8d3c1f5de4c9d
BLAKE2b-256 f319290c97674ba7d2ae291be5214b452e08007dd34142d6ed17637f4f72adcb

See more details on using hashes here.

File details

Details for the file tenk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tenk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for tenk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69559f7cf3a6dcd73a0b40cf55263457f448bcfaf2e18968d7c772a06240775e
MD5 660e37084d8f3b091c09a0215371cd92
BLAKE2b-256 db5efd0bccaed39cb021c6833848875f2f70c5bce98d2ed082e69c61128cf6e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page