The last piece: a bot that knows your website
Your chatbot so far only knows what’s in the system prompt. The final trick: give it your website’s data in the prompt. This is called giving AI context:
const informace = `
You are the helper for the FK Sokol Nebovidy website. Here is the information:
- Practice: Tuesday and Thursday at 5:00 PM, field behind the school
- Next match: Saturday at 10:00 AM, home game against Lipová
- Coach: Mr. Novák, contact info is on the Contacts page
- Membership fee: $60 per semester
Answer in English, briefly and in a friendly tone. When the
answer isn't in the information above, say: "I don't know that,
check the Contacts page or ask the coach."
`;
// ...in the endpoint:
messages: [
{ role: 'system', content: informace },
{ role: 'user', content: otazka },
],
Now the bot answers real questions about your project – and politely says “I don’t know” to everything else. This is exactly how real web AI assistants are built.
Final challenge 💪
Finish your project’s Inventor toolkit – all three pieces together:
- A widget with API data (weather from lesson 3) wherever it makes sense.
- A map with pins (lesson 4).
- A chatbot with context – write 5–10 real facts about your website into its prompt.
🏫 School website – final assignment
The bot knows: the school’s address, the principal’s name, after-school care hours, the cafeteria, enrollment dates, and 3 clubs. The map shows the school, and the weather widget shows the forecast for the next event. Test question: “Until what time is after-school care?”
🙋 Personal website – final assignment
The bot knows: your hobbies, favorite games/books, what you know and what you’re learning. A map with 3 favorite places, a weather widget for your city. Test question: “What does he/she enjoy besides programming?”
🌍 Travel journal – final assignment
The bot knows: your last 3 trips (where, when, what happened) and your next plan. A map of all your trips, a weather widget for the next destination. Test question: “Where did they go last and how was it?”
⚽ Club website – final assignment
The bot knows: practice schedule, next match, roster, membership fees, coach contact. A map of the home field, a weather widget for the match. Test question: “When and where is the next match?”
Final check
You’re done when:
- Your website loads live data from at least one API (weather).
- The map has pins with popups.
- The chatbot correctly answers 5 test questions about your project.
- The bot politely declines off-topic questions.
- The secret key isn’t in the browser or on GitHub.
Congratulations – you’re an Inventor! Your website is no longer just a page: it can talk to the world. Don’t forget to pick up your certificate.
What to take away from this lesson
- Context in a prompt = a bot that knows your website and doesn’t make things up.
- API + map + AI together turn a website into a service people will actually use.
- Next stop: Level 6 – Project Boss. Your website deserves its own address on the internet.
© 2026 Ing. Martin Polak / AlgoRhino · Content usage terms