muhammadsalmanalfaridzi commited on
Commit
c6713c7
·
verified ·
1 Parent(s): 0439da4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -9
app.py CHANGED
@@ -109,15 +109,23 @@ with st.sidebar:
109
  query_engine = index.as_query_engine(streaming=True)
110
 
111
  # ====== Customise prompt template ======
112
- qa_prompt_tmpl_str = (
113
- "Context information is below.\n"
114
- "---------------------\n"
115
- "{context_str}\n"
116
- "---------------------\n"
117
- "Given the context information above I want you to think step by step to answer the query in a highly precise and crisp manner focused on the final answer, in case you don't know the answer say 'I don't know!'.\n"
118
- "Query: {query_str}\n"
119
- "Answer: "
120
- )
 
 
 
 
 
 
 
 
121
  qa_prompt_tmpl = PromptTemplate(qa_prompt_tmpl_str)
122
 
123
  query_engine.update_prompts(
 
109
  query_engine = index.as_query_engine(streaming=True)
110
 
111
  # ====== Customise prompt template ======
112
+ qa_prompt_tmpl_str = """
113
+ You are an AI assistant specialized in analyzing GitHub repositories.
114
+
115
+ Repository structure:
116
+ {tree}
117
+ ---------------------
118
+
119
+ Context information from the repository:
120
+ {context_str}
121
+ ---------------------
122
+
123
+ Given the repository structure and context above, provide a clear and precise answer to the query.
124
+ Focus on the repository's content, code structure, and implementation details.
125
+ If the information is not available in the context, respond with 'I don't have enough information about that aspect of the repository.'
126
+
127
+ Query: {query_str}
128
+ Answer: """
129
  qa_prompt_tmpl = PromptTemplate(qa_prompt_tmpl_str)
130
 
131
  query_engine.update_prompts(