Using learning content for RAG

Manabu2 learning content is structured as paths → courses → sections → lessons. This page explains how to read that content through the API and use it as a source for your own RAG (retrieval-augmented generation) pipeline.

Manabu2 does not have built-in RAG today: no vector search, no AI answers with citations, and no RAG admin screens. Chunking, embedding, retrieval and answer generation happen in your own stack. Built-in RAG is being designed.

1. What you can use today

Read content with these API endpoints and MCP tools. With an app token, only what the signed-in user may see is returned.

Purpose Endpoint / tool Scope
Search courses and pathsGET /api/v1/searchread:catalog
List courses; a course's sections and published lessonsGET /api/v1/courses
GET /api/v1/courses/{id}
read:catalog
List paths; a path's coursesGET /api/v1/paths
GET /api/v1/paths/{id}
read:catalog
Lesson body (HTML), materials list, and quiz (without answers)GET /api/v1/lessons/{id}read:content
Material detailsGET /api/v1/materials/{id}read:content
Search and read from an MCP-capable AI assistantsearch_content / get_course / get_lesson_detailSame as the API

Search is a keyword search over course and path titles and descriptions. It does not cover lesson bodies and is not a vector search.

2. Building your own RAG pipeline

A typical flow:

  1. List courses with GET /api/v1/courses, then collect section and published-lesson ids with GET /api/v1/courses/{id}.
  2. Fetch each lesson body (bodyHtml) with GET /api/v1/lessons/{id} and convert the HTML to text.
  3. Split into chunks per lesson or per heading, and embed them with the model of your choice.
  4. Store them in your vector store together with metadata (see below).
■ Fetching a lesson
GET https://api.manabu2.com/api/v1/lessons/{lessonId}
Authorization: Bearer {access_token}

{
  "id": "...",
  "sectionId": "...",
  "courseId": "...",
  "title": "...",
  "summary": "...",
  "bodyHtml": "<h2>...</h2><p>...</p>",
  "orderIndex": 0,
  "culture": "ja-JP",
  "materials": [ ... ],
  "quiz": { ... }
}

Only the main fields are shown. See the REST API docs for the exact format.

3. Metadata and visibility

  • Attach lessonId, courseId, sectionId, title and culture to each chunk so answers can cite the lesson, and so you can find chunks to update or delete.
  • The API returns only content the token's user may see. For an internal assistant, record which permissions you synced with and restrict answers to the same scope.
  • Once private course content is copied into your own index, protecting it is up to your stack.

4. Keeping it current

  • There are no webhook events for content being added, updated or deleted today. Re-fetch on a schedule.
  • Lesson responses don't include an updated-at time, so store a hash of bodyHtml and compare it to re-embed only the lessons that changed.
  • Remove lessons from your index when they no longer appear in the course details (unpublished or deleted).

5. About built-in RAG

We're designing lesson-text indexing, answers with citations and a RAG admin console inside Manabu2. This page will say so when they become available.


Next: REST API docs →