gptscript-ai / knowledge

Knowledge for GPTScript
https://gptscript-ai.github.io/knowledge/
Apache License 2.0
29 stars 14 forks source link

add: merging retriever with example for hybrid search using bm25 and semantic search #86

Closed iwilltry42 closed 2 months ago

iwilltry42 commented 2 months ago

Example flow config:

flows:
  hybrid:
    default: true
    retrieval:
      retriever:
        name: merge
        options:
          topK: 10
          retrievers:
            - name: basic
              weight: 0.5
              options:
                topK: 10
            - name: bm25
              weight: 0.5
              options:
                topN: 10
                k1: 1.2
                b: 0.75
                cleanStopWords:
                  - en
                  - de