Skip to content

Commit a90e534

Browse files
author
Daniele Briggi
committed
fix(tests): exact match without prompt template
1 parent 5ff2752 commit a90e534

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/sqlite_rag/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def configure_settings(
151151
),
152152
prompt_template_retrieval_query: Optional[str] = typer.Option(
153153
None,
154-
help="Template for retrieval query prompts, use {content} as placeholder",
154+
help="Template for retrieval query prompts, use `{content}` as placeholder",
155155
),
156156
):
157157
"""Configure settings for the RAG system.

tests/integration/test_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def test_search_exact_match(self):
2929
"configure",
3030
"--model-path",
3131
str(model_path),
32+
"--prompt-template-retrieval-query",
33+
"",
3234
"--other-vector-options",
3335
"distance=cosine",
3436
],

tests/test_sqlite_rag.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,10 @@ def test_reset_database(self):
514514

515515
def test_search_exact_match(self):
516516
# cosin distance for searching embedding is exact 0.0 when strings match
517-
settings = {"other_vector_options": "distance=cosine"}
517+
settings = {
518+
"prompt_template_retrieval_query": None,
519+
"other_vector_options": "distance=cosine",
520+
}
518521

519522
temp_file_path = os.path.join(tempfile.mkdtemp(), "something")
520523

@@ -550,6 +553,7 @@ def test_search_samples_exact_match_by_scan_type(self, quantize_scan: bool):
550553
# Test that searching for exact content from sample files returns distance 0
551554
# FTS not included in the combined score
552555
settings = {
556+
"prompt_template_retrieval_query": None,
553557
"other_vector_options": "distance=cosine",
554558
"weight_fts": 0.0,
555559
"quantize_scan": quantize_scan,

0 commit comments

Comments
 (0)