Skip to content

Implementing simple stand alone question answering. #3195

Answered by anakin87
jay-devx asked this question in Questions
Discussion options

You must be logged in to vote

The available generators are:

  • RAGenerator (Retrieval-Augmented Generator): it relies on a retriever or, anyway, it needs vector embeddings for the documents
  • Seq2SeqGenerator: generic sequence-to-sequence generator based on Hugging Face's transformers
  • OpenAIAnswerGenerator: you need an OpenAI account

If you want to quickly manually try a Generator node, I'll report a straightforward example for you using Seq2SeqGenerator.
Note: In any case, for better results, I suggest to read the available tutorials (RAG, LFQA) that use the generators in combination with a retriever.

from haystack import Document
from haystack.nodes import Seq2SeqGenerator

# some texts about Queen Elizabeth
texts=[
    

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jay-devx
Comment options

Answer selected by jay-devx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants