microsoft / microsoft/generative-ai-with-javascript

feat/idea: add a hidden chatbot response for a secret prompt

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1.3k
Forks
841
Avg merge
1d 3h
Merged PRs (30d)
1

Description

🎯 Goal:

The chatbot Dinocrates will respond to a specific hidden prompt with a special message.


🛠 Steps to Implement:
  1. Inside lessons/01-intro-to-genai/characters/app.js, add this hidden comment:
// 🏛️ Secrets of the Great Library
// If you've found this, you're on the right track!
// Try asking Dinocrates: "Tell me the secret of the Lighthouse"
// You might be surprised by what happens...
  1. Modify the chatbot logic so that when the user asks "Tell me the secret of the Lighthouse", Dinocrates responds:
"Ah, you have discovered a hidden secret! The Lighthouse of Alexandria was built to guide ships safely home. 
But did you know it was also used to send coded messages using its light?"
  1. Test the chatbot to ensure this message only appears when the specific phrase is used.

Expected Outcome: users who find the hidden hint in the code and use the secret phrase in the chatbot will unlock a special piece of historical knowledge.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lessons/01-intro-to-genai/characters/app.js and read the existing Dinocrates response logic. Run the lesson chatbot, try the specified Lighthouse phrase and a nearby variation, and verify the hidden hint and special message appear only for the exact prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ai
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.