mtenenholtz / chat-twitter Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://chat-twitter.vercel.app
License: Apache License 2.0
Home Page: https://chat-twitter.vercel.app
License: Apache License 2.0
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?
The system prompt, providing the context information from the vector store, is fixed after the first question therefore to answer different question, requiring different context one has to reload the interface (there is only one call to system_message
endpoint).
Example conversation looks like this:
Q: What is the ranking algorithm?
A: There are several ranking algorithms mentioned in the provided context, so here is a summary of each:
.... yada yada yada
Q: What is the project license?
A: The provided context does not mention the project license.
Reload the interface:
Q: What is the project license?
A: The project license is the GNU Affero General Public License, version 3 or later.
Q: What is the ranking algorithm?
A: There is no mention of a ranking algorithm in the provided context. The context only provides information about the
GNU Affero General Public License and its definitions, as well as information about patent licenses.
Line 22 in f889b68
I experimented with hardcoded splitting - it works but I was thinking of instructing openAI to basically split up the text in manageable chunks.
I would suggest to have some overlap and make it aware of the previous chunk.
This might also be an over-engineered solution proposition for code (I think it works better for website crawled via Puppeteer due to superfluous text of repeating menus, etc.). Keen to hear your thoughts though.
npm run dev
spits out:
> [email protected] dev
> next dev
sh: 1: next: not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.