File size: 1,522 Bytes
75ca03c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76d2ac6
 
 
 
 
0b1473d
75ca03c
 
 
 
0b1473d
75ca03c
 
 
 
 
0b1473d
 
 
 
 
 
 
 
75ca03c
 
 
0b1473d
75ca03c
0b1473d
75ca03c
0b1473d
75ca03c
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
components:
  - name: DocumentStore
    type: FAISSDocumentStore
    params:
      faiss_index_path: "my_faiss_index.faiss"
      faiss_config_path: "my_faiss_config.json"

  - name: Retriever
    params:
      document_store: DocumentStore
      embedding_model: "sentence-transformers/multi-qa-mpnet-base-dot-v1"
    type: EmbeddingRetriever

  - name: PromptNode
    type: OpenAIAnswerGenerator
    params:
      model: text-davinci-003
      max_tokens: 200 # The maximum number of tokens allowed for each generated Answer.
      temperature: 0.8 # Determines the randomness of the model. Higher values mean the model will take more risks
      frequency_penalty: 0.1 # Positive values penalize new tokens based on their existing frequency in the text so far.
      presence_penalty: 0.1 #  Positive values penalize new tokens based on whether they have already appeared in the text.
      top_k: 3 # The number of results to return
      api_key: "loaded-from-env"

  - name: TextFileConverter
    type: TextConverter
pipelines:
  - name: query_1
    nodes:
      - inputs: [Query]
        name: Retriever
      - inputs: [Retriever]
        name: PromptNode

  - name: query_2
    nodes:
      - inputs: [ Query ]
        name: Retriever
      - inputs: [ Retriever ]
        name: PromptNode

  - name: indexing
    nodes:
      - name: TextFileConverter
        inputs: [ File ]
      - name: Retriever
        inputs: [ TextFileConverter ]
      - name: DocumentStore
        inputs: [ Retriever ]
version: ignore