OWASP / OWASP/OpenCRE

Spike: Haystack 3 vs in-tree Librarian for chat RAG

Open
#1,077 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement not ready for development untriaged
Dominant language
Python
Stars
180
Forks
137
Avg merge
3d 23h
Merged PRs (30d)
21

Description

Task

Time-boxed research spike (not an adoption PR): does Haystack 3 (Apache-2.0) buy anything OpenCRE does not already have in Librarian C.1/C.2 + title_boost, for chat RAG after #1075?

Default bias from maintainer research: do not replace /completion with a Haystack app. This spike exists to kill or narrow that option with evidence.

Success criteria (all must pass)

  • Written verdict in this issue: adopt / don’t adopt / steal one component
  • Compare on OpenCRE constraints, not generic RAG blogs:
    • Prod Heroku slug: no torch / sentence-transformers in requirements.txt
    • pgvector already in Postgres; CRE + Standard embedding tables
    • Must emit CRE id + standard URL citations
    • Existing PromptHandler + Google login + spend limits
  • If “steal one component”: name the class (e.g. hybrid BM25+dense, eval pipeline) and an estimate of lines vs wrapping PgVectorRetriever
  • Kill criteria: if Haystack is only a wrapper around “embed → pgvector top-k → rerank → prompt”, don’t adopt
  • License/ops: Apache-2.0 is fine; note extra services (Elastic/OpenSearch) if any pipeline we care about requires them
  • No production dependency added in this spike. A spike branch/doc is OK; do not merge Haystack onto main from this ticket

Context

  • In-tree: application/utils/librarian/ (retriever, CE rerank, factory)
  • Chat: application/prompt_client/prompt_client.py generate_text
  • Related: #1075 (implementation), #1078 (RAGAS spike), #965 (MyOpenCRE)

Constraints

  • Time-box: 1–2 days of reading + a throwaway notebook/script against a tiny local fixture, not a platform rewrite
  • Out of scope: Dify, RAGFlow, Onyx, Open Notebook, LlamaIndex-as-the-chat-app (LlamaIndex stays harvester-dev only)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read application/utils/librarian/ and application/prompt_client/prompt_client.py, especially generate_text, then compare Haystack 3 with the existing retrieval flow using a tiny local fixture and throwaway notebook or script. Done means recording an adopt, don’t adopt, or single-component verdict with constraint, licensing, operations, and line-count evidence, without adding a production dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
ai, backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.