Skip to main content

Project logo

Structured-QA: a Blueprint by Mozilla.ai for answering questions about structured documents.

Docs Tests Ruff

This Blueprint demonstrates how to use open-source models and a simple LLM workflow to answer questions based on structured documents.

It is designed to showcase a simpler alternative to more complex and/or resource demanding alternatives, such as RAG systems that rely on vectorDBs and/or long-context models with large token windows.

structure-qa Diagram

📘 To explore this project further and discover other Blueprints, visit the Blueprints Hub.

👉 📖 For more detailed guidance on using this project, please visit our Docs here.

Quick-start

Get started with structured-qa using one of the options below:

Google Colab HuggingFace Spaces GitHub Codespaces
Try on Colab Try on Spaces Try on Codespaces

You can also install and use the blueprint locally:

Command Line Interface

pip install structured-qa
structured-qa \
--question "What optimizer was used to train the model?" \
--input_file "example_data/1706.03762v7.pdf" \
--output_dir "example_outputs/1706.03762v7.pdf"

Graphical Interface App

git clone https://github.com/mozilla-ai/structured-qa.git
cd structured-qa
pip install -e .
python -m streamlit run demo/app.py

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Contributing

Contributions are welcome! To get started, you can check out the CONTRIBUTING.md file.

Metadata

Release files for structured-qa 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for structured-qa 1.0.4
File Size Uploaded Provenance Actions
structured_qa-1.0.4.tar.gz 1.7 MB With provenance Details for structured_qa-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for structured-qa 1.0.4
File Interpreter ABI Platform Actions
structured_qa-1.0.4-py3-none-any.whl Python 3 none any Details for structured_qa-1.0.4-py3-none-any.whl

Total release size: 1.8 MB

Release files / structured_qa-1.0.4.tar.gz

Download URL structured_qa-1.0.4.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
421a32d066ff79e08caea1a8005139dc31b5602da065391aa992267a9d50a9a9
BLAKE2b-256 checksum
How to use checksums
c4e78e9d0684e3bd4dbad23fc69917dcb8344471b50834f59868441b84ddb30e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 6, 2025.

Transparency log

Release files / structured_qa-1.0.4-py3-none-any.whl

Download URL structured_qa-1.0.4-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62927fb2d2bf059702a82518ff3be70e739834f63478cb4dc0191c5aa602e773
BLAKE2b-256 checksum
How to use checksums
e1b676359428e3e6526b9fa834b6e988c84d4032cc4cb472ecfde341892ea9ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 6, 2025.

Transparency log

Security for structured-qa 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for structured_qa-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 6, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page