-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
❓ Generate Clarification Questions with Simple NLP 🤔
📝 Description
Create a backend function to generate 2-5 natural-language clarification questions based on the parsed project idea. This uses simple keyword matching (mocking LLM behavior) to identify gaps, like data needs or Stellar specifics, for a non-technical chat flow.
🎯 Objective
Implement a standalone function in /backend to produce targeted questions from idea keywords, enhancing the interactive clarification step.
✅ Requirements
- In
/backend, create a new fileclarificationGenerator.js. - Implement a function
generateQuestions(ideaText)that extracts keywords (e.g., regex for "remesas", "datos") and maps to predefined question templates (e.g., if "Stellar" mentioned, ask "Qué datos sensibles necesitas?"). - Return an array of 2-5 questions as strings, with visual-friendly phrasing (e.g., including emojis).
- Handle edge cases: If no keywords, return generic questions.
- Export the function for use in routes like /chat/init.
- Commit changes to the Git repository with a message like "Implemented clarification question generator with simple NLP".
🏆 Expected Outcomes
clarificationGenerator.jsis created and the function returns relevant questions (e.g., input "App remesas Stellar" → ["¿Qué volumen de transacciones esperas? 💸", "¿Datos off-chain como emails? 📧"]).- Questions are natural and non-technical, limited to 2-5 per call.
- Function is testable independently via Node REPL.
- Changes committed, and integrates with existing parsing logic.
🔗 References
- JavaScript Regex for Keyword Extraction
- Simple NLP in JS (optional library; use if installed, else pure JS)
📋 Notes
- Keep it mock-simple: No real LLM; use if/else or switch on keywords for now.
- Test with sample inputs: Log questions to console and verify variety.
- Later, replace with full LLM integration for advanced parsing.
Metadata
Metadata
Assignees
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week