mirror of
				https://github.com/deepset-ai/haystack.git
				synced 2025-10-31 17:59:27 +00:00 
			
		
		
		
	 7167a26483
			
		
	
	
		7167a26483
		
			
		
	
	
	
	
		
			
			* Make strealit tolerant to haystack not knowing its version, and adding special error for docstore issues * Add workaround for a Streamlit bug * Make default filters value an empty dict * Return more context for each answer in the rest api * Make the hs_version call not-blocking by adding a very quick timeout * Add disclaimer on low confidence answer * Use the no-answer feature of the reader to highlight questions with no good answer
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| version: '0.9'
 | |
| 
 | |
| components:    # define all the building-blocks for Pipeline
 | |
|   - name: DocumentStore
 | |
|     type: ElasticsearchDocumentStore
 | |
|     params:
 | |
|       host: localhost
 | |
|   - name: Retriever
 | |
|     type: ElasticsearchRetriever
 | |
|     params:
 | |
|       document_store: DocumentStore    # params can reference other components defined in the YAML
 | |
|       top_k: 5
 | |
|   - name: Reader       # custom-name for the component; helpful for visualization & debugging
 | |
|     type: FARMReader    # Haystack Class name for the component
 | |
|     params:
 | |
|       model_name_or_path: deepset/roberta-base-squad2
 | |
|       context_window_size: 500
 | |
|       return_no_answer: true
 | |
|   - name: TextFileConverter
 | |
|     type: TextConverter
 | |
|   - name: PDFFileConverter
 | |
|     type: PDFToTextConverter
 | |
|   - name: Preprocessor
 | |
|     type: PreProcessor
 | |
|     params:
 | |
|       split_by: word
 | |
|       split_length: 1000
 | |
|   - name: FileTypeClassifier
 | |
|     type: FileTypeClassifier
 | |
| 
 | |
| pipelines:
 | |
|   - name: query    # a sample extractive-qa Pipeline
 | |
|     type: Query
 | |
|     nodes:
 | |
|       - name: Retriever
 | |
|         inputs: [Query]
 | |
|       - name: Reader
 | |
|         inputs: [Retriever]
 | |
|   - name: indexing
 | |
|     type: Indexing
 | |
|     nodes:
 | |
|       - name: FileTypeClassifier
 | |
|         inputs: [File]
 | |
|       - name: TextFileConverter
 | |
|         inputs: [FileTypeClassifier.output_1]
 | |
|       - name: PDFFileConverter
 | |
|         inputs: [FileTypeClassifier.output_2]
 | |
|       - name: Preprocessor
 | |
|         inputs: [PDFFileConverter, TextFileConverter]
 | |
|       - name: Retriever
 | |
|         inputs: [Preprocessor]
 | |
|       - name: DocumentStore
 | |
|         inputs: [Retriever]
 |