AI Hints
Home›RAG Tutorial›A First RAG App
RAG · Lesson 7 of 120

Meet the Knowledge Base

Northwind Bikes.

⏱ 2 min read▶ Video at 6:06🎓 Free
Watch this lesson in the RAG courseWatch on YouTube ↗Full RAG course

Throughout this course, we'll build a help desk for Northwind Bikes, a small bike shop with three stores. Its help centre has fourteen short pages, about shipping, returns, e-bike batteries, error codes, prices, and more.

Meet the Knowledge Base
From the video: Meet the Knowledge Base
  • Northwind Bikes
  • Fourteen help pages
  • Our knowledge base

Listing the files

The pages are markdown files in one folder. We loop over them, and print each name with its number of words. Run it. Fourteen files, from a few dozen to over a hundred words each. Small enough to read, but big enough to need search.

list_kb.pypython
from pathlib import Path

files = sorted(Path("data/rag/northwind").glob("*.md"))
for f in files:
    print(f"{f.name:20} {len(f.read_text().split()):4} words")
print(len(files), "files")
Output
ebike_battery.md      125 words
ebike_errors.md       149 words
finance.md             74 words
membership.md          67 words
price_list_2025.md     34 words
price_list_2026.md     47 words
privacy.md             58 words
rentals.md             86 words
returns.md            120 words
servicing.md          104 words
shipping.md           128 words
sizing.md              99 words
stores.md              82 words
warranty.md           104 words
14 files

One page

Here's one page, the e-bike error codes. Each code has a short fix. Notice the codes, like E zero seven. We'll see later that exact codes like these need special care when searching.

ebike_errors.mdmarkdown
# E-bike display error codes

E01: the battery is not connected properly...
E02: the battery is too hot or too cold...
E05: the motor is overheating...
E07: communication error between the display and the motor.
     Turn the bike off, unplug the display cable,
     plug it back in firmly, and turn it on again.

Summary

Our knowledge base is the Northwind Bikes help centre, fourteen short markdown pages. Next, the simplest possible retriever.

Key takeaways
  • Northwind Bikes
  • 14 markdown pages
  • Codes, prices, policies
Next up: The Simplest Retriever — matching words