Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
add: blueprint for new context tool
Browse files Browse the repository at this point in the history
  • Loading branch information
iwilltry42 committed Aug 30, 2024
1 parent 8b5b439 commit d619212
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/flows/config/blueprints.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import (
//go:embed blueprints/default.yaml
var BlueprintDefault []byte

//go:embed blueprints/context.yaml
var BlueprintContext []byte

var Blueprints = map[string][]byte{
"default": BlueprintDefault,
"context": BlueprintContext,
}

func GetBlueprint(name string) ([]byte, error) {
Expand Down
48 changes: 48 additions & 0 deletions pkg/flows/config/blueprints/context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
flows:
context:
default: true
retrieval:
querymodifiers:
# Enhance
- name: enhance
options:
model:
openai:
apiKey: "${OPENAI_API_KEY}"
model: gpt-4o
apiType: OPEN_AI
baseURL: "${OPENAI_BASE_URL}"
retriever:
name: merge
options:
topK: 10
retrievers:
- name: subquery
weight: 0.7
options:
limit: 3 # max. 3 subqueries
topK: 10 # topK per search
model:
openai:
apiKey: "${OPENAI_API_KEY}"
model: gpt-4o
apiType: OPEN_AI
baseURL: "${OPENAI_BASE_URL}"
- name: bm25
weight: 0.3
options:
topN: 10
k1: 1.2
b: 0.75
cleanStopWords:
- auto
postprocessors:
- name: similarity
options:
threshold: 0.4
- name: reduce
options:
topK: 10



0 comments on commit d619212

Please sign in to comment.