Initial SQL-only 1C adapter baseline
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Ask 1C RAG
|
||||
|
||||
Цель: проверить полный локальный сценарий 1С RAG:
|
||||
|
||||
```text
|
||||
question -> local search -> context prompt -> optional vLLM answer
|
||||
```
|
||||
|
||||
## Prepare Example Corpus
|
||||
|
||||
```powershell
|
||||
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
|
||||
|
||||
```powershell
|
||||
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
|
||||
|
||||
```powershell
|
||||
python scripts/ask_1c_rag.py "Какие реквизиты есть у справочника Номенклатура?" --index plugins/1c/datasets/prepared/rag_index.example.json --print-prompt
|
||||
```
|
||||
|
||||
Этот режим не требует запущенной модели. Он нужен для проверки, какой контекст будет передан LLM.
|
||||
|
||||
## Check Prompt Guardrails
|
||||
|
||||
```powershell
|
||||
python scripts/check_1c_rag_prompt.py
|
||||
```
|
||||
|
||||
## Ask Running Model
|
||||
|
||||
После запуска vLLM:
|
||||
|
||||
```powershell
|
||||
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С.
|
||||
Reference in New Issue
Block a user