optimized AI prompt
This commit is contained in:
@@ -4,25 +4,21 @@ const { validateToken } = require("../middlewares/auth");
|
|||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
const nlsPrompt = `
|
const nlsPrompt = `
|
||||||
You are an AI designed to help navigate a website by interpreting natural language inputs and providing the correct site route. Below are routes and a brief description of each:
|
"/": home
|
||||||
|
"/springboard": user dashboard
|
||||||
"/" : home
|
"/manage-account": user account management
|
||||||
"/springboard" : user dashboard
|
"/events": events
|
||||||
"/manage-account" : user account management
|
"/karang-guni-schedules": browse slots
|
||||||
"/events" : events
|
"/home-bill-contest": participate in contest & earn vouchers
|
||||||
"/karang-guni-schedules" : browse slots
|
"/home-bill-contest/new-submission": submit bill
|
||||||
"/home-bill-contest" : participate in contest & earn vouchers
|
"/community-posts": show posts
|
||||||
"/home-bill-contest/new-submission" : submit bill
|
"/community-posts/create": create post
|
||||||
"/community-posts" : show posts
|
|
||||||
"/community-posts/create" : create post
|
|
||||||
|
|
||||||
based on input, provide appropriate route in following format:
|
|
||||||
|
|
||||||
{
|
|
||||||
"route": "<appropriate route>",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
based on input, provide appropriate route closest to fulfilling user's needs
|
||||||
If none matches user query, return empty route.
|
If none matches user query, return empty route.
|
||||||
|
in following format:
|
||||||
|
|
||||||
|
{"route": "<appropriate route>"}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
async function naturalLanguageSearch(userQuery) {
|
async function naturalLanguageSearch(userQuery) {
|
||||||
|
|||||||
Reference in New Issue
Block a user