Skip to content

Commit

Permalink
rm embedding.id from context
Browse files Browse the repository at this point in the history
  • Loading branch information
CahidArda committed Jun 6, 2024
1 parent b197702 commit d898330
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class Database {
const facts = result
.filter((x) => x.score >= similarityThreshold)
.map(
(embedding) => `- Context Id '${embedding.id}': ${embedding.metadata?.[metadataKey] ?? ""}`
(embedding) => `- ${embedding.metadata?.[metadataKey] ?? ""}`
);
return formatFacts(facts);
}
Expand Down
1 change: 0 additions & 1 deletion src/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const QA_PROMPT_TEMPLATE =
To help you answer the questions, a context will be provided. This context is generated by querying the vector store with the user question.
Answer the question at the end using only the information available in the context and chat history.
If the answer is not available in the chat history or context, do not answer the question and politely let the user know that you can only answer if the answer is available in context or the chat history.
In your responses, reference the ids of the context items you used used in your response. Ids are provided to you as "Context Id '<id>'".
-------------
Chat history:
Expand Down

0 comments on commit d898330

Please sign in to comment.