@@ -148,6 +148,10 @@ def configure_settings(
148148 use_gpu : Optional [bool ] = typer .Option (
149149 None , help = "Whether to allow sqlite-ai extension to use the GPU"
150150 ),
151+ prompt_template_retrieval_query : Optional [str ] = typer .Option (
152+ None ,
153+ help = "Template for retrieval query prompts, use {content} as placeholder" ,
154+ ),
151155):
152156 """Configure settings for the RAG system.
153157
@@ -171,6 +175,7 @@ def configure_settings(
171175 "weight_fts" : weight_fts ,
172176 "weight_vec" : weight_vec ,
173177 "use_gpu" : use_gpu ,
178+ "prompt_template_retrieval_query" : prompt_template_retrieval_query ,
174179 }
175180
176181 # Filter out None values (unset options)
@@ -404,6 +409,11 @@ def search(
404409@app .command ()
405410def quantize (
406411 ctx : typer .Context ,
412+ preload : bool = typer .Option (
413+ False ,
414+ "--preload" ,
415+ help = "Preload quantized vectors into memory for faster search" ,
416+ ),
407417 cleanup : bool = typer .Option (
408418 False ,
409419 "--cleanup" ,
@@ -420,9 +430,14 @@ def quantize(
420430 typer .echo ("Quantization cleanup completed." )
421431 else :
422432 typer .echo ("Starting vector quantization..." )
433+
423434 rag .quantize_vectors ()
435+ if preload :
436+ typer .echo ("Preloading quantized vectors into memory..." )
437+ rag .quantize_preload ()
438+
424439 typer .echo (
425- "Vector quantization completed. Now you can search with `--quantize-scan` and `--quantize-preload` enabled."
440+ "Vector quantization completed. Now you can search with `--quantize-scan` enabled."
426441 )
427442
428443
0 commit comments