neo4j-graphacademy / llm-chatbot-typescript Goto Github PK
View Code? Open in Web Editor NEWhttps://graphacademy.neo4j.com/courses/llm-chatbot-typescript/
https://graphacademy.neo4j.com/courses/llm-chatbot-typescript/
The unit test Speculative Answer Generation Chain › Simple RAG › should refuse to answer if information is not in context
in the file src/modules/agent/chains/speculative-answer-generation.chain.test.ts
fails because the language model (I'm using OpenAI) used in the implementation is ignoring the instruction to not answer the question if the answer is not provided in the context during the unit test execution.
Run the unit tests using npm run test speculative-answer-generation.chain.test.ts
Observe that the test Speculative Answer Generation Chain › Simple RAG › should refuse to answer if information is not in context fails.
The test should pass by confirming that the language model refuses to answer questions when the required information is not present in the provided context.
The language model attempts to answer the question even when the necessary information is not included in the context, leading to the test failure.
I have just passed the Answer Generation Chain
step in your GraphAcademy course. Filing this issue assuming there is no future step in the course, that will make the test pass later on.
initGraph is unable to instantiate the Neo4JGraph when running the test graph.test.ts
. The failure message returned from the test is:
Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration
I'm using Neo4J 5.18.1, and my APOC plugin is installed.
I've tested this on a local database, and my sandbox, and it returns the same error above.
I am an employee of infocz, neo4j's Korean partner company.
I am writing a comment because an error occurred while learning the "chatbot with typescript" course.
if i run this code "npm run test cypher-evaluation.chain.test.ts"
Line 61 "expect(found).toBe(true);" An error occurs in the code
The reason is that the error was not found through "error.includes("label Muvee does not exist"))" and the "found" variable could not be changed to "true".
So I checked the chain response error message through "console.log(errors)", changed it to "error.includes("Label 'Muvee' does not exist")", and the test was successful.
If you are experiencing the same problem, I hope this helps.
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.