haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Explain when connecting components requires to explicitly name inputs / outputs

Open julian-risch opened this issue 1 year ago • 2 comments

@aantti pointed out that Haystack's documentation doesn't explain when it is required to name inputs / outputs and when it is optional. It might not be clear to users what's the suggested way for example when creating an indexing pipeline:

p.connect("text_file_converter", "document_joiner")
p.connect("pypdf_converter", "document_joiner")
p.connect("markdown_converter", "document_joiner")
p.connect("document_joiner", "document_cleaner")
or this
p.connect("text_file_converter", "document_joiner.documents")
p.connect("pdf_file_converter", "document_joiner.documents")
p.connect("markdown_converter", "document_joiner.documents")
p.connect("document_joiner.documents", "document_cleaner.documents")

Parts of our documentation might also be misleading, for example this part

The components' outputs and inputs match and are explicitly indicated. For example, if a component produces two outputs, when connecting it to another component, you must indicate which output connects to which input.

https://docs.haystack.deepset.ai/docs/pipelines#validation

julian-risch avatar Aug 21 '24 13:08 julian-risch

@julian-risch I think we should use this heavily: https://github.com/deepset-ai/haystack/issues/8271

And also include it in tutorials to help people get used to using it

TuanaCelik avatar Aug 22 '24 13:08 TuanaCelik

It would be great to have it clearly and consistently described across docs and tutorials. Otherwise it might be an obstacle while trying to figure out what's the 'right' way :)

aantti avatar Aug 22 '24 13:08 aantti