Skip to main content

Multimodal retrieval engine

Project description

bicardinal

Multimodal retrieval engine. Drop in PDFs, Word docs, images, audio, or plain text, bicardinal extracts, summarizes, embeds, and indexes them so you can search across everything with one call.

Install

pip install bicardinal

Set your provider keys (used for OCR, vision, transcription, and summaries):

export OPENAI_API_KEY=sk-...
export MISTRAL_API_KEY=...

Deadly simple

from pathlib import Path
from bicardinal import Bicardinal

store = Bicardinal("./data")          # a home for your collections
col = store.create("docs")            # make a collection
col.init("build")                     # open it for ingestion

# Throw any file at it, pdf, docx, png, mp3, txt...
for path in Path("./my_files").glob("*"):
    col.ingest(path.name, path.read_bytes())

col.finalize() # build the index

# Search across everything
for hit in col.search("quarterly revenue growth", k=5):
    print(f"{hit.score:.3f}  {hit.filename}#{hit.chunk_index}  {hit.raw_text[:80]}")

col.close()

That's it. No pipelines to wire, no embedding code to write.

A little more

# Rank whole files by relevance
for f in col.most_similar_files("budget forecast", k=3):
    print(f.score, f.filename)

# Search within a single document
col.search_in_file("conclusion", "report.pdf", k=5)

# Reopen later, it's all on disk
col = store.open("docs")

See examples/quickstart.py for a fuller tour.

License

Apache-2.0

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

bicardinal-0.0.2.tar.gz (765.2 kB view details)

Uploaded Source

Built Distribution

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

bicardinal-0.0.2-py3-none-any.whl (768.3 kB view details)

Uploaded Python 3

File details

Details for the file bicardinal-0.0.2.tar.gz.

File metadata

  • Download URL: bicardinal-0.0.2.tar.gz
  • Upload date:
  • Size: 765.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bicardinal-0.0.2.tar.gz
Algorithm Hash digest
SHA256 22b8bd7aafe88ee241c2d084eeae112bedf657ffb4d2a4590b63004de98733f1
MD5 94cbae074d584c0ddff35721d64cae69
BLAKE2b-256 a46bb190afedd9894c14234bdeaf52b8efe43bac516167545bee02e605aa5989

See more details on using hashes here.

File details

Details for the file bicardinal-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: bicardinal-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 768.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bicardinal-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97428247ad5c3564196591e0e970051741334a3a294ca987977d1c1a4c51e80c
MD5 86ad492ab0e09d40fb389f3fad5144b7
BLAKE2b-256 6ae80f8359990726c157e7ed654a3796803fb6982c47815fe6c75ddc116ef1d4

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