Build an AI Learning Assistant for Your E-Learning: The Ultimate Guide

In the world of learning and development, the goal has always been to create a meaningful, engaging experience. But for too long, our e-learning has been a static, one-sided conversation. Today, that changes.

Imagine an instructional experience where every learner has a personal, on-demand AI Learning Assistant built right into their course. No more generic feedback or unanswered questions. Just a powerful, AI-driven partner dedicated to mastering your course content.

This guide will show you how to build a RAG (Retrieval-Augmented Generation) chatbot and embed it into your Articulate Storyline 360 projects using a stack of powerful tools—most of them available on a free tier. The entire process requires a single paid tool, making this a cost-effective way to get started.

Here is the complete, step-by-step process.


Phase 1: Setting Up Your Free Tool Stack

Before we build anything, let’s get our accounts and keys ready. This is the foundation upon which your chatbot will stand.

  1. Flowise Cloud (Free Tier): This is the central hub where we’ll build our chatbot’s logic. Sign up for a free Flowise Cloud account. While the free tier is perfect for testing, you’ll want to consider a paid or self-hosted solution for production.
  2. Pinecone (Free Tier): Our vector database. We’ll use Pinecone’s free tier to store our course documents, which the AI will use as its knowledge base. Sign up for a free Pinecone account. Remember to create an index with 1536 dimensions to match OpenAI’s embedding model.
  3. OpenAI (Paid – $5 Credit is Plenty): This is the one paid piece of our puzzle. We’ll use OpenAI for both text embeddings (to prepare our data for Pinecone) and the chat model itself. Create an API key here and purchase some credits. This key is your golden ticket, so keep it safe.
  4. AWS (Free Tier): We’ll use AWS S3 to host the final HTML file that will be embedded in Storyline. You can also use any other hosting, but AWS Free Tier is a great way to start. Create an AWS account here.

Phase 2: Building the RAG Chatbot in Flowise

Now for the fun part: bringing your AI Learning Assistant to life.

  1. Create a Document Store: In Flowise, create a new Document Store and give it a name (e.g., Tutorial-Knowledge-Base).
  2. Upload Your Course Material: Add a Document Loader (PDF, DOCX, TXT, etc.) and upload your course documents. Select the Recursive Character Text Splitter and adjust the chunk size to suit your content.
  3. Upsert to Pinecone: Once the documents are processed, click More Actions > Upsert All Chunks.
  4. Connect Your APIs:
    • Select OpenAI Embeddings as the embedding model and enter your OpenAI API key.
    • Select Pinecone as the vector database and enter your Pinecone API key, environment, and the index name you created earlier.
    • Click Save and then Upsert to push your document chunks into the Pinecone index.
  5. Build the Chatflow:
    • Create a new chatflow.
    • Add a Chat OpenAI node (using your OpenAI key).
    • Add a Buffer Window Memory node (set to remember 30 messages).
    • Add a Retrieval QA Chain node.
    • Add a Document Store Retriever and select the document store you just created.
    • Connect the nodes: Document Store Retriever to Retrieval QA Chain, Chat OpenAI to Retrieval QA Chain, and Buffer Window Memory to Retrieval QA Chain.
  6. Create the Prompt: In the Retrieval QA Chain node’s additional parameters, paste your instructions. This is where you define your chatbot’s rules, tone, and constraints. Use this template:
You are Your Bot Name, an expert tutor for Your Learning Platform. Your sole purpose is to help learners understand the course material for "Your Course Name".

Here are your rules:
First, check if the question is related to the course. If the user asks about a topic completely unrelated to "Your Course Name," politely inform them that you can only assist with the course material. Do not use the fallback message for these questions.
Next, use the provided documents. Your responses must be grounded exclusively in the provided course material. You may use your general knowledge to understand context, infer relationships, and make comparisons between different parts of the provided documents, but you must never generate new facts.
Answer from relevant content. If the provided documents contain information relevant to the user's course-related question, you must formulate a concise and accurate response using only that information.
Use the fallback as a last resort. If the provided documents are completely empty or contain no relevant information to a course-related question, then and only then should you use the fallback response.

Your response for off-topic questions is: "I can only help with questions related to the 'Your Course Name' course material."

Your fallback message for unanswered course-related questions is: "Please send a message to your course teacher for more information."
  1. Test It Out: Save your chatflow and test it with questions that can only be answered by the documents you uploaded.

Phase 3: Hosting and Embedding in Storyline

This is the final step where you make your AI Learning Assistant accessible to your learners.

  1. Generate the HTML File: Use the HTML generator tool from our tutorial to create your chatbot.html file.
  2. Host on AWS S3:
    • In the AWS console, create a new S3 bucket (e.g., tutorial-chatbot).
    • Important: Uncheck “Block all public access” when creating the bucket.
    • Upload your chatbot.html file.
    • Go to the Permissions tab and add a Bucket Policy to allow public read access.
    • Enable Static website hosting in the Properties tab and note the Bucket website endpoint URL. This is the link you’ll use in Storyline.
  3. Embed in Storyline 360:
    • In your Storyline project, insert a Web Object from the Insert tab.
    • Paste the Bucket website endpoint URL into the address field.
    • Make sure the object loads automatically and resize it as needed.
  4. Publish and Test: Publish your Storyline course and test the chatbot. If you encounter an “Access Denied” error, double-check your S3 bucket permissions.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
        }
    ]
}


Leave a Reply

Your email address will not be published. Required fields are marked *