Install the integration:
bash
pip install 'poma[qdrant]'PomaQdrant is a QdrantClient subclass with POMA-specific helpers.
Recommended flow
python
import os
from poma import PrimeCut
from poma.integrations.qdrant import PomaQdrant
client = PrimeCut()
result = client.ingest("example.pdf", show_progress=True)
qdrant = PomaQdrant(
url=os.environ["QDRANT_URL"],
api_key=os.environ["QDRANT_API_KEY"],
cloud_inference=True,
collection_name="poma-docs",
dense_model="sentence-transformers/all-MiniLM-L6-v2",
sparse_model="Qdrant/bm25",
dense_size=384,
auto_create_collection=True,
)
qdrant.upsert_poma_points(result)
cheatsheets = qdrant.get_cheatsheets(
query="What does the document say about retention?",
limit=3,
)
print(cheatsheets[0]["content"])Accepted input types
upsert_poma_points(...) accepts:
- typed
PomaResult - legacy chunk-data dictionaries
- a path to a
.pomaarchive
Collection creation
If you set auto_create_collection=True, also set dense_size.
Query modes
get_cheatsheets(...) supports three modes:
query=...for a convenience text queryquery_obj=...andprefetch=...for direct Qdrant query controlresults=...to convert existing Qdrant results into cheatsheets