Skip to main content

coreason-search

Project description

coreason-search

The Unified Retrieval Execution Engine for the CoReason ecosystem.

License CI Ruff Docs

coreason-search serves as the "Librarian" of the CoReason architecture, designed to solve three distinct problems: Ad-Hoc Reasoning (RAG), Systematic Evidence Synthesis, and Context Distillation. It adopts a "Late Chunking / No Chunking" philosophy, utilizing SOTA 32k context embeddings to process full documents.

Features

  • Long-Context Sovereignty: Utilizes SOTA embeddings (e.g., Qwen3-Embedding) with 32k context windows to ingest full research papers without "chunk-and-pray" methods.
  • Modular Strategy Pattern: Supports multiple retrieval strategies:
    • Dense Retriever: Vector-based semantic search using LanceDB.
    • Sparse Retriever: Boolean/Keyword search for systematic reviews (PubMed style).
    • Graph Retriever: Symbolic 1-hop neighbor expansion using coreason-graph-nexus.
  • Hybrid Fusion: Implements Reciprocal Rank Fusion (RRF) to merge results from vector and keyword searches robustly.
  • Precision Re-Ranking: Uses Cross-Encoders to re-rank top results for maximum precision.
  • Context Distillation (The Scout): Compresses documents by stripping irrelevant sentences, maximizing the signal-to-noise ratio for downstream LLMs.
  • Systematic Search Mode: Supports "Research-Grade" reproducible reviews with strict boolean logic and generator-based pagination for large result sets.

Installation

pip install coreason-search

Usage

from coreason_search.engine import SearchEngine
from coreason_search.schemas import SearchRequest, RetrieverType

# Initialize the engine (loads configuration automatically)
engine = SearchEngine()

# Define a search request
request = SearchRequest(
    query="mechanism of action of aspirin in liver failure",
    strategies=[RetrieverType.LANCE_DENSE, RetrieverType.LANCE_FTS],
    fusion_enabled=True,
    rerank_enabled=True,
    distill_enabled=True,
    top_k=5
)

# Execute the search
response = engine.search(request)

# Process results
for hit in response.hits:
    print(f"[{hit.score:.4f}] {hit.doc_id}")
    print(f"Distilled Context: {hit.distilled_text}\n")

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

coreason_search-0.2.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

coreason_search-0.2.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file coreason_search-0.2.0.tar.gz.

File metadata

  • Download URL: coreason_search-0.2.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coreason_search-0.2.0.tar.gz
Algorithm Hash digest
SHA256 66994e0db283fdc6d9e8870ef315d383bfd04ec83d21de0dc6e934ec33d0cc64
MD5 fc9f6417b867e1776ab06033525954f6
BLAKE2b-256 15253f3fbd72317f6a2adac4376e2be470a9739747e16b84e2cfa89bf2d1e354

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_search-0.2.0.tar.gz:

Publisher: publish.yml on CoReason-AI/coreason-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coreason_search-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coreason_search-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36896ef835a67e09bdd373c4059af901ba1da86225db739016540dd565fd04f9
MD5 1e1d5deda5d482ef7db83ea29372b705
BLAKE2b-256 c56b26c9a48da6a7cf7b9cc0d48fc9486a601dde5cd8f987a86580276a7cf19a

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_search-0.2.0-py3-none-any.whl:

Publisher: publish.yml on CoReason-AI/coreason-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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