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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bicardinal-0.0.3.tar.gz.
File metadata
- Download URL: bicardinal-0.0.3.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55370f8f831030049570abbdfc110860c5be40567a31574a87f6fd0e703c1a2d
|
|
| MD5 |
4bf396bef1add6936e4d1b4203dabbd1
|
|
| BLAKE2b-256 |
68a0e90ac0dc25fdf65c15208c5035241c61bbecf53d8c023aa2ccbf7828cc46
|
File details
Details for the file bicardinal-0.0.3-py3-none-any.whl.
File metadata
- Download URL: bicardinal-0.0.3-py3-none-any.whl
- Upload date:
- Size: 768.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c827dde5b4ee78e200477cc2e2f3deb00cbbd47a52feba84a43f3b0d22f95450
|
|
| MD5 |
b066a70013cf9e9b0cc187ebbc5840b0
|
|
| BLAKE2b-256 |
506179f2b00ac9e7784facfd7b102e9e9b2a6280c4b139f39aa78813084276db
|