Skip to content

Incorrect query text used when retrieving additional context #9

@adamdossa

Description

@adamdossa

When retrieving additional context for the latest user query, the query string (used for KNN against the pinecone embeddings) includes the system prompt (as well as some of the users previous queries).

Whilst the users previous user queries might be useful (although we already have context for these in theory), the system prompt (AI instructions + initial context) doesn't seem relevant or useful here (querying for additional context) and seems likely to cause the additional context to not be a great match for the latest user query.

Looks like a bug to me, but perhaps I am missing something?

https://github.com/mtenenholtz/chat-twitter/blob/f889b688aa35d38a9823e0dde5c0cff94a6ae1fc/backend/main.py#LL168C17-L168C31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions