opensolr-haystack 0.2.6__tar.gz → 0.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensolr-haystack
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Summary: Haystack integration for Opensolr — managed Apache Solr DocumentStore with server-side embeddings and hybrid BM25+kNN retrieval
5
5
  Author-email: Opensolr <support@opensolr.com>
6
6
  License: MIT
@@ -49,20 +49,24 @@ BATCH_EMBED_MAX = 50
49
49
  # rules make it lead with the answer and keep the concrete details. Callers
50
50
  # can still override everything by passing ``instruction``.
51
51
  DEFAULT_RAG_INSTRUCTION = (
52
- "Answer the query using only the context below. "
53
- "Do not repeat or restate the question, and do not print it as a heading. "
54
- "If the question is a yes or no question and the context supports it, begin with \"Yes\". "
55
- "For any other question, begin with the fact itself, never with \"Yes\". "
56
- "Never begin with \"No\" when the context does support the answer. "
57
- "Start with the answer itself: do not open with a preamble about what the context does "
58
- "or does not address, and never say the context does not cover the query and then answer "
59
- "it anyway. "
60
- "Give a substantive answer with the concrete details from the context: who, what, where "
61
- "and when. "
62
- "Do not dismiss the query on a technicality. If the context covers something closely "
63
- "related rather than the exact wording used, explain what it does say and how it relates. "
64
- "Only if nothing in the context is relevant at all, say so in one sentence and name what "
65
- "the context is about instead."
52
+ # Length cap and formatting reworked 2026-08-26: the earlier "two to four sentences"
53
+ # rule produced a dense paragraph that dropped most of what the documents said.
54
+ # Verified against a real four-document context before shipping — bulleted, far more
55
+ # detail, zero invented terms. The "do not add from your own knowledge" line is what
56
+ # keeps it grounded; without it the model pads the list with generic advice.
57
+ "Answer the question using only the context below.\n"
58
+ "Begin with the answer itself, the specific fact, product or detail. "
59
+ "No preamble, no restating the question, no heading.\n"
60
+ "Be thorough: cover every relevant point the context offers, with the concrete details "
61
+ "\u2014 names, model numbers, measurements, standards, dates.\n"
62
+ "Format it for reading, in Markdown: short paragraphs, and a bullet list when the answer "
63
+ "is a set of steps, precautions or options, each bullet opening with a bold lead-in naming "
64
+ "that item. Never invent generic headings such as \"Overview\", \"Key Points\" or \"Summary\".\n"
65
+ "Use only what the context states. Do not add advice, products or standards from your own "
66
+ "knowledge.\n"
67
+ "If the context holds no answer, say that in the first sentence and name what it does "
68
+ "contain instead.\n"
69
+ "Never present something as suitable for a purpose the context does not state."
66
70
  )
67
71
 
68
72
  class OpensolrError(RuntimeError):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensolr-haystack
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Summary: Haystack integration for Opensolr — managed Apache Solr DocumentStore with server-side embeddings and hybrid BM25+kNN retrieval
5
5
  Author-email: Opensolr <support@opensolr.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "opensolr-haystack"
7
- version = "0.2.6"
7
+ version = "0.2.8"
8
8
  description = "Haystack integration for Opensolr — managed Apache Solr DocumentStore with server-side embeddings and hybrid BM25+kNN retrieval"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }