Class: SimpleRag::Generate

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_rag/generate.rb

Instance Method Summary collapse

Instance Method Details

#prompt(query, retrieved_chunks) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/simple_rag/generate.rb', line 3

def prompt(query, retrieved_chunks)
  prompt = "    Context information is below.\n    ---------------------\n    \#{retrieved_chunks.join(\"\\n---------------------\\n\")}\n    ---------------------\n    Given the context information and not prior knowledge, answer the query.\n    Query: \#{query}\n    Answer:\n  PROMPT\nend\n"