Skip to main content

Question answering for local knowledge bases with exact source citations.

Project description

askbase

Question answering for local knowledge bases with exact source citations.

Setup

uv tool install --python 3.13 askbase

To index PDFs, install the optional PDF dependencies:

uv tool install --python 3.13 'askbase[pdf]'

Set these environment variables before indexing or asking questions:

  • ASKBASE_MODEL
  • ASKBASE_MODEL_API_KEY
  • ASKBASE_EMBEDDING_MODEL
  • ASKBASE_EMBEDDING_MODEL_API_KEY
  • ASKBASE_EMBEDDING_BATCH_SIZE

Usage

Build a local SQLite index for a directory:

askbase index -d /path/to/docs

This writes .askbase/askbase.sqlite inside the target directory.

Ask a question against that index:

askbase ask -d /path/to/docs "What does the source say?"

Main Files

  • askbase/cli.py: command-line entry point.
  • askbase/index.py: indexes source files into SQLite.
  • askbase/extract.py: extracts text from Markdown, text, and PDF files.
  • askbase/chunk.py: creates line-preserving chunks.
  • askbase/db.py: stores documents, chunks, FTS rows, and embeddings.
  • askbase/search.py: combines BM25 and embedding retrieval.
  • askbase/answer.py: builds evidence prompts and validates citations.

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

askbase-1.0.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

askbase-1.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file askbase-1.0.1.tar.gz.

File metadata

  • Download URL: askbase-1.0.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for askbase-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1d7b8aa5b9e87d0e61b6ea3b75c65bf434b235177d9dcea041f11b4a3fac3025
MD5 e83c6faa080aa3d70849512a52bc5898
BLAKE2b-256 903bcdc0c0cd0937d745d3ece7e27150e6330db54a5373d855c220d75b3f2388

See more details on using hashes here.

File details

Details for the file askbase-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: askbase-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for askbase-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b71f383bb73589edd1fa3ee9f6dc8d5d3633b670f2e8074c099e8330314f5a3
MD5 ba20b8c94db43ca106db79cdc77f1476
BLAKE2b-256 2f8ebe5e59b2072d8241c033daf72b9cf11dc7274fab2b17c004ae781a2ad24b

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