Jakaria commited on
Commit
1cf02bf
·
1 Parent(s): 208eea1

Add Bangla model API

Browse files
Files changed (1) hide show
  1. rag.py +14 -3
rag.py CHANGED
@@ -19,13 +19,24 @@ def build_chain():
19
 
20
  llm = ChatGroq(model=GROQ_MODEL, api_key=GROQ_API_KEY, temperature=0.1)
21
 
22
- # Simple combined prompt
23
  chat_prompt = ChatPromptTemplate.from_messages([
24
  SystemMessagePromptTemplate.from_template(
25
- "You are a helpful 10 years experience financial expert assistant. Use the context to answer user questions also give reference from pdf like page number or section name"
26
  ),
27
  HumanMessagePromptTemplate.from_template(
28
- "Context:\n{context}\n\nQuestion:\n{question}\nAnswer clearly and concisely:"
 
 
 
 
 
 
 
 
 
 
 
29
  )
30
  ])
31
 
 
19
 
20
  llm = ChatGroq(model=GROQ_MODEL, api_key=GROQ_API_KEY, temperature=0.1)
21
 
22
+ # Combined system + human prompt
23
  chat_prompt = ChatPromptTemplate.from_messages([
24
  SystemMessagePromptTemplate.from_template(
25
+ "You are a helpful financial expert assistant with 10 years of experience. Use the context to answer."
26
  ),
27
  HumanMessagePromptTemplate.from_template(
28
+ """Context:
29
+ {context}
30
+
31
+ Question:
32
+ {question}
33
+
34
+ Answer the question clearly and concisely, and include a reference from the document.
35
+ For example:
36
+ Question: What is the purpose of the financial policy objectives and strategies statement?
37
+ Answer: The purpose of the financial policy objectives and strategies statement is to make transparent the Government’s financial strategies and to establish a benchmark for evaluating the Government’s conduct of financial policy.
38
+ Reference: page:5
39
+ """
40
  )
41
  ])
42