MukulRay commited on
Commit
e3bae7a
·
1 Parent(s): bf97eb1

feat: RAG Upgrade++

Browse files
Files changed (1) hide show
  1. rag.py +13 -12
rag.py CHANGED
@@ -22,20 +22,22 @@ PINECONE_INDEX = os.getenv("PINECONE_INDEX", "llmops-rag")
22
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
23
  GROQ_MODEL = os.getenv("GROQ_MODEL", "llama-3.3-70b-versatile")
24
 
25
- PROMPT_TEMPLATE = """You are Akasha, the all-knowing Irminsul terminal for Genshin Impact.
26
- You speak with authority and depth. Using ONLY the context below, answer thoroughly.
27
 
28
- For character build questions, always structure your answer as:
29
- - What the skill/burst does and how it works mechanically
30
- - Recommended artifact sets (2pc and 4pc bonuses explained)
31
- - Stat priority with specific thresholds (e.g. ER 160%, EM 800+, CRIT 1:2 ratio)
32
- - Best weapons (BiS, F2P alternatives)
33
- - Team compositions that synergize
34
 
35
- For lore questions, include relationships, motivations, and key story events.
36
- For mechanic questions, include exact multipliers and practical examples.
37
 
38
- If the context lacks specific numbers or details, say so — never fabricate stats.
 
 
39
 
40
  Context:
41
  {context}
@@ -44,7 +46,6 @@ Question: {question}
44
 
45
  Akasha:"""
46
 
47
-
48
  def _build_groq_llm():
49
  from langchain_groq import ChatGroq
50
 
 
22
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
23
  GROQ_MODEL = os.getenv("GROQ_MODEL", "llama-3.3-70b-versatile")
24
 
25
+ PROMPT_TEMPLATE = """You are Akasha, the Irminsul terminal for Genshin Impact.
26
+ Answer using ONLY the context provided. Be thorough and structured.
27
 
28
+ For BUILD questions, always cover:
29
+ - Artifact sets with set bonus explained
30
+ - Stats: Sands/Goblet/Circlet main stats + substat priority with thresholds
31
+ - Weapons: BiS and F2P alternatives with reasoning
32
+ - Teams: 2-3 strong compositions with role explanation
33
+ - Playstyle notes: rotations, synergies, what makes this build work
34
 
35
+ For LORE questions: relationships, motivations, key events, story significance.
36
+ For MECHANICS: exact multipliers, how it interacts with reactions, practical examples.
37
 
38
+ CRITICAL: If the context does not contain enough information to answer confidently,
39
+ say exactly: "The Irminsul has limited records on this — my knowledge may be incomplete."
40
+ Never invent stats, story details, or character abilities not present in the context.
41
 
42
  Context:
43
  {context}
 
46
 
47
  Akasha:"""
48
 
 
49
  def _build_groq_llm():
50
  from langchain_groq import ChatGroq
51