1.6 KiB
1.6 KiB
Ask 1C RAG
Цель: проверить полный локальный сценарий 1С RAG:
question -> local search -> context prompt -> optional vLLM answer
Prepare Example Corpus
python scripts/prepare_1c_rag_corpus.py --source-dir plugins/1c/rag/examples --output plugins/1c/datasets/prepared/rag_corpus.example.jsonl
Build Example Index
python scripts/build_1c_rag_index.py --corpus plugins/1c/datasets/prepared/rag_corpus.example.jsonl --output plugins/1c/datasets/prepared/rag_index.example.json
Render Prompt Only
python scripts/ask_1c_rag.py "Какие реквизиты есть у справочника Номенклатура?" --index plugins/1c/datasets/prepared/rag_index.example.json --print-prompt
Этот режим не требует запущенной модели. Он нужен для проверки, какой контекст будет передан LLM.
Check Prompt Guardrails
python scripts/check_1c_rag_prompt.py
Ask Running Model
После запуска vLLM:
python scripts/ask_1c_rag.py "Какие реквизиты есть у справочника Номенклатура?" --index plugins/1c/datasets/prepared/rag_index.example.json --base-url http://docker-gpu.cin.su:8000 --model qwen3-4b-instruct
Ожидаемое поведение: модель не должна выдумывать реквизиты. Она должна сказать, что для ответа нужны метаданные 1С.