-
Notifications
You must be signed in to change notification settings - Fork 0
/
ragoo.yaml
96 lines (86 loc) · 2.19 KB
/
ragoo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
routes:
- path: /k8s
workflow:
ref: k8s-docs
workflows:
- name: k8s-docs
stages:
- name: k8s-docs-rag
steps:
- type: embedder
ref: ollama/arctic
action: generate
params:
input: $_input
var: embedding
- type: storage
ref: duckdb/main
action: lookup.cosine
params:
embedding: $embedding
collection: k8s
threshold: 0.65
limit: 2
var: refs
- type: importer
ref: k8s-files
action: resolve.refs
params:
refs: $refs
seperator: \n
var: context
- type: service
ref: ollama/llama
action: completion
params:
prompt: |
$context
----
Using the information above, answer the question below in 100 words or less.
If the answer is not contained entirely within the information provided, reply 'I do not know' without any additional text.
Only provide an answer to the question, do not summarize all of the information.
----
Question: $_input
var: _response
embedders:
- name: ollama/arctic
type: ollama
config:
model: snowflake-arctic-embed
storage:
- name: duckdb/main
type: duckdb
config:
dbFilePath: .data/ragoo.db
services:
- name: ollama/llama
type: ollama
config:
model: llama3
importers:
- name: k8s-files
type: file
config:
directory: /Users/cohix-lab/workspaces/cohix/kubernetes-the-hard-way/docs/
steps:
- type: embedder
ref: ollama/arctic
action: generate
params:
input: $_chunk
var: embedding
- type: storage
ref: duckdb/main
action: insert.embedding
params:
embedding: $embedding
ref: $_ref
batch: $_batch
collection: k8s
cleanup:
type: storage
ref: duckdb/main
action: cleanup
params:
batch: $_batch
collection: k8s