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.
The default sparse_model is "Qdrant/bm25", so the convenience query path uses hybrid dense+sparse retrieval unless you set sparse_model=None.
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
If you call get_cheatsheets(results=...), you can also pass chunk_data=... to rebuild cheatsheets from authoritative chunk data instead of relying on stored payload chunk_details.
Advanced helpers
For lower-level point generation or result conversion, import the helpers from poma.integrations.qdrant.qdrant_poma_utils.
The main helpers are:
prepare_points_from_chunk_data(...)points_from_chunk_data(...)results_to_cheatsheet_inputs(...)cheatsheets_from_results(...)ensure_collection(...)
See the Qdrant integration reference for the full signatures.