Skip to content

Commit

Permalink
Merge pull request #194 from eye-on-surveillance/AI/fix-citations
Browse files Browse the repository at this point in the history
AI/fix-citations
  • Loading branch information
ayyubibrahimi authored Dec 21, 2023
2 parents 7f79f13 + 746ea0e commit d18b1c5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/googlecloud/functions/getanswer/inquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ def get_indepth_response_from_query(df, db, query, k):
doc_list = db.similarity_search_with_score(query, k=k)

docs = sort_retrived_documents(doc_list)
# print(docs)

docs_page_content = append_metadata_to_content(docs)
print(docs_page_content)

template = """
Question: {question}
Expand All @@ -200,11 +198,15 @@ def get_indepth_response_from_query(df, db, query, k):
Please provide direct and concise responses without unnecessary verbosity.
If your response includes technical or uncommon terms related to city council that may not be widely understood, kindly provide a brief definition for those terms at the end of your response.
If your response includes technical or uncommon terms related to city council that may not be widely understood, kindly provide a brief definition for those terms at the end of your response in the following format with the <br /> brackets instead of new lines:
Definitions: [Word]: [Definition], [Word]: [Definition]
Definitions: <br />
Word: Definition<br />
Word: Definition<br />
Word: Definition<br />
Please break the definitions onto new lines with
Please put each definition on a new line.
The final output should be in paragraph form without any formatting, such as prefixing your points with "a.", "b.", or "c."
The final output should not include any reference to the model's active sorting by date.
Expand Down

0 comments on commit d18b1c5

Please sign in to comment.