Chatbot AI Project Dataset: Build, Check and Split Your intents.json Before You Train (Free Intents File Checker)

Chatbot AI project results are decided by the dataset long before you pick a model. Most student bots train on an intents file copied from a tutorial, with four greetings, three goodbyes and a few made-up questions, and then everyone is surprised when accuracy looks perfect in the notebook and falls apart in the demo. This guide shows how to collect real patterns, structure the file, catch conflicts and weak intents, split off a fair test set and write the dataset chapter of your report. A free checker reads your intents.json and lists every problem it finds.

8–15patterns per intent to aim for
1 in 5patterns held out for testing
0patterns shared by two intents
1fallback intent, always

⚡ In short

  • The intents file is your training data. A small, honest, real-world file beats a big copied one.
  • Collect patterns from real people: classmates, the office FAQ, WhatsApp groups, notice boards. Keep their exact words.
  • No pattern may sit in two intents. Every intent needs responses. Aim for 8 to 15 wordings each.
  • Hold out every 5th pattern as a test set before training, and never edit it to make the model pass.
  • Add a fallback intent, and describe the dataset properly in your report.
Chatbot ai project in LiveChatBot: AI Agent knowledge sources and a sample chat answered from them
How it looks in LiveChatBot: AI Agent knowledge sources and a sample chat answered from them.

Why the data

Examiners have seen the tutorial intents file a hundred times

Search for a chatbot tutorial in Python and you’ll find the same file again and again: tags like “greeting”, “goodbye”, “thanks”, “hours” and “payments”, each with four or five patterns someone typed in a minute. It’s fine for learning how a neural network or a TF-IDF matcher works. It’s a weak base for a final-year chatbot AI project.

There are three problems with it. First, the patterns are invented, so they’re tidy: “What are your hours?” Real users type “college timing kya hai” and “open on saturday?”. Second, the file is tiny, so the model memorises it. Training accuracy reaches 100% and tells you nothing. Third, nobody split off a test set, so there’s no honest number to put in the results chapter.

Your examiner knows all of this. When they ask “where did your data come from?” and “how did you test it?”, a copied file has no good answer. A dataset you collected, cleaned and split yourself does, and it’s often the strongest part of the viva.

The good news is that building a real dataset is not hard. It takes a few evenings, not weeks. You need a narrow domain (one college office, one shop, one clinic, one hostel), 6 to 12 intents, 8 to 15 real wordings per intent, and a short list of rules that the checker below enforces. If you haven’t picked your domain yet, our student project ideas list has two dozen with a twist each, and the scoped project plan shows how to fit the work into your weeks.

The format

What goes inside an intents file

Almost every beginner framework, from NLTK and Keras tutorials to simple scikit-learn classifiers, reads the same structure. It’s a JSON object with one list called intents. Each intent has three parts:

  • tag: a short, unique name for what the user wants, such as fees, admission or hostel. Lowercase, no spaces.
  • patterns: the different ways people ask for it. These are the training examples. Each one is a full question in the user’s words.
  • responses: what the bot says when it matches the tag. One good response is enough; several give variety.

Some versions add a context field to chain intents (for example, only answer “which branch?” after “admission”). Leave it out unless your project is specifically about multi-turn conversation; it adds bugs faster than marks.

Here is one well-formed intent and the fallback intent every file should have. Notice that the patterns include a Hinglish question and a typo-prone short form, because those are what real students type.

{
  "intents": [
    {
      "tag": "fees",
      "patterns": [
        "what is the fee for btech",
        "how much is the fees per year",
        "fee structure please",
        "can i pay fees in instalments",
        "btech kitna fees hai",
        "last date to pay the fees",
        "is there any scholarship on fees",
        "fees for lateral entry"
      ],
      "responses": [
        "B.Tech fees are listed on the Fees page. You can pay in two instalments each year."
      ]
    },
    {
      "tag": "fallback",
      "patterns": [],
      "responses": [
        "Sorry, I can't answer that yet. Please call the college office on weekdays, 9 am to 5 pm."
      ]
    }
  ]
}

Collecting patterns

Collect real patterns for your chatbot AI project in three evenings

Invented patterns are the main reason student bots fail in demos. Collect them instead. Three sources work well for most college-level projects:

Evening 1: existing questions

If your bot is for a college office, ask the office staff what they’re asked most. Read the admissions FAQ page, the notice board and old WhatsApp group messages (with permission). For a shop or clinic bot, ask the owner to forward a month of customer messages with names and numbers removed. Copy each question exactly as written.

Evening 2: a short form

Make a form with one instruction: “Type how you would ask about X.” List your intents as X, one per question. Send it to 15 to 25 classmates, juniors or family members. Each person gives you one wording per intent, so 20 people produce 20 patterns per intent in an evening. Ask them not to copy each other.

Evening 3: clean and sort

Remove names, phone numbers, roll numbers and email addresses. Keep spelling mistakes, Hinglish and short forms like “btech” and “fees?”. Split messages that ask two things into two patterns. Delete exact repeats, but keep different wordings of the same question, because variety is what you’re collecting.

Aim for 8 to 15 patterns per intent. Fewer than 5 is too thin for any model to learn from. More than 30 for one intent while others have 6 makes the data unbalanced, and the model starts guessing the big intent for everything. If one intent is much larger, either collect more for the others or trim the big one.

Free tool

Check your intents file before you train

Paste your intents.json. The checker finds invalid JSON, patterns shared by two intents, near-identical patterns, intents without responses, thin and unbalanced intents and a missing fallback, then suggests a test set.

Paste your intents file (the usual {"intents":[{"tag":…,"patterns":[…],"responses":[…]}]} format, or a plain list of intents).

Runs only in your browser; nothing is sent or saved.

Reading the results

What each problem means and how to fix it

The example file in the checker has the mistakes we see most often. Here's what each one means.

A pattern in two intents. "what is the fee" sits under both fees and admission. The model sees the same input labelled two ways and can't learn either reliably. Decide what the user really wants and keep the pattern in one place. If admission fees are a real question, write it as "what are the admission fees" under fees.

Near-identical patterns across intents. "fees for hostel" (fees) and "hostel fees" (hostel) use the same key words. Word-order changes don't fool a bag-of-words model. Pick one intent for hostel fees. This is the most common cause of a confused demo.

No responses. The courses intent has six good patterns and nothing to say. The model would classify correctly and the bot would reply with an empty string or crash.

Thin intents. Admission has three patterns and goodbye has four. The model has almost nothing to generalise from. Collect more wordings, or merge a tiny intent into a related one.

Unbalanced intents. If one tag has 40 patterns and another has 6, accuracy can look high simply because the model predicts the big tag. Keep the largest within about three times the smallest.

No fallback. Without it, every off-topic question ("who won the match?") is forced into the nearest intent and answered confidently and wrongly. A fallback intent plus a confidence threshold fixes that; more on it below.

Fix the errors, paste again and repeat until the verdict says the file is ready.

Examples

Weak patterns versus useful ones

Fees intent
🚩 Weak“What are the fees?”, “Tell me the fees.”, “Fees?” (three wordings of one sentence)
✅ Useful“btech fees per year”, “can i pay in instalments”, “kitna fees hai”, “scholarship on fees?” (different real angles)
Hostel intent
🚩 Weak“hostel fees” (also in fees)
✅ UsefulHostel fees live in one intent only; hostel keeps rooms, food, rules and timings
Greeting intent
🚩 WeakTwenty versions of hi and hello, dwarfing every other intent
✅ UsefulSix to eight greetings, so the useful intents carry more weight
Off-topic questions
🚩 WeakNo intent for them; the bot guesses
✅ UsefulA fallback intent with a clear next step, such as the office phone number and hours

The test set

Split before you train, and never touch the test set

Accuracy on the data you trained on is not a result. Every serious evaluation keeps some data aside that the model never sees during training, and reports the score on that.

The simplest fair rule for a small intents file is: hold out every 5th pattern from each intent with at least 5 patterns. That's about 20% of the data, spread evenly across intents. The checker lists exactly which patterns this rule picks, and the script below does the same split so your files match what you report.

Two rules matter more than the exact percentage:

  1. Split before you look at results. If you train, see which questions fail, and then move them into training, your test score is no longer honest.
  2. Never edit test patterns to make the model pass. If a test question fails, add more varied training patterns for that intent, retrain, and test again on the unchanged test set.

For an even stronger chapter, collect a second, small "fresh" test set from people who did not contribute any training patterns, say 3 per intent from five new people. A model that does well on held-out patterns but badly on fresh ones has learned your contributors' style rather than the task. That gap is worth a paragraph in your results.

Report accuracy per intent, not just overall, and include a confusion table showing which intents get mixed up. Our chatbot testing guide shows how to build that table with pytest.

import json

with open("intents.json", encoding="utf-8") as f:
    data = json.load(f)

train, test = [], []
for intent in data["intents"]:
    pats = intent["patterns"]
    held = pats[4::5]                      # every 5th pattern goes to the test set
    kept = [p for i, p in enumerate(pats) if i % 5 != 4]
    train.append({**intent, "patterns": kept})
    for p in held:
        test.append({"text": p, "tag": intent["tag"]})

with open("train.json", "w", encoding="utf-8") as f:
    json.dump({"intents": train}, f, indent=2)
with open("test.json", "w", encoding="utf-8") as f:
    json.dump(test, f, indent=2)

print(len(test), "test questions held out")

Fallback

The intent most student projects forget

A classifier always picks the closest intent, even when the question has nothing to do with your domain. Ask a college-office bot "what's the weather?" and, without a fallback, it might reply with hostel rules.

The fix has two parts. First, add a fallback intent whose responses admit the limit and give a next step: "Sorry, I can't answer that yet. Please call the college office on weekdays, 9 am to 5 pm." It needs no patterns, because it's triggered by low confidence, not by matching. Second, choose a confidence threshold: if the model's top score is below it, reply with the fallback instead of the top intent. Start around 0.5 to 0.7 for a softmax classifier and tune it on your held-out data, not your training data.

Then test it on purpose. Write 10 to 15 out-of-scope questions (sports, weather, jokes, other colleges) and check that most of them reach the fallback. Report that number too; examiners like seeing that the bot knows what it doesn't know.

This is exactly how business bots behave in practice. LiveChatBot's AI Agent answers only from the knowledge a business gives it, and when it can't answer, the conversation goes to the team inbox, a free keyword bot replies from saved replies, or an away form collects the visitor's email or phone. Comparing your fallback to a production pattern like that makes a good "real-world relevance" paragraph. The artificial intelligence project blueprint covers that link in more depth.

Checklist

Dataset ready to train

Dataset progress

The report

How to write the dataset chapter of a chatbot AI project report

Most project reports give the dataset one line: "We used an intents.json file." Give it a full section instead. It's evidence that you understand where model performance comes from. Cover these points:

  • Source. Where patterns came from (office FAQ, forwarded messages, a form sent to 22 classmates) and when. Mention that contributors agreed and that personal details were removed; India's DPDP Act 2023 is a good reference for why.
  • Size. A table with each tag, its number of patterns and responses. The checker's table is a ready start.
  • Cleaning. What you removed and what you deliberately kept, such as typos and Hinglish, and why.
  • Split. The rule (every 5th pattern), the sizes of training and test sets, and the fresh test set if you made one.
  • Limits. What the data doesn't cover: other languages, voice input, questions about individual students' records.

In your results chapter, report per-intent accuracy on the test set, the fallback rate on out-of-scope questions, and two or three examples of failures with a reason. Honest failures with explanations earn more marks than a suspicious 100%. For the summary page, our abstract builder turns these numbers into a 200-word abstract, and the presentation outline shows how to show them in a viva.

Beyond the classroom

Turning your dataset into a bot people can use

The work you put into the dataset carries straight over to a real website bot. A business doesn't need you to train a classifier; it needs the same thinking: which questions come up, in which words, what the right answer is, and what happens when the bot can't help.

If the college office, shop or clinic you built the project for wants to use it, you can move your intents and responses into a hosted tool rather than run your own server. In LiveChatBot, your responses become the knowledge the AI Agent answers from and saved replies the keyword bot and the team can use; your fallback becomes a handover to the team inbox or an away form. Our guide to training an AI chatbot explains how, and saved replies covers the keyword side. The free plan covers two websites with 100 visitors per website each month; see pricing or start at livechatbot.in.

That's also a strong closing slide: a dataset you collected, a model you tested honestly, and a path to real users.

Frequently asked questions

How many patterns does a chatbot AI project need per intent?

Aim for 8 to 15 real wordings per intent, with 6 to 12 intents. Fewer than 5 patterns is too thin to learn from, and the largest intent should stay within about three times the smallest.

Can I use an intents.json file from GitHub?

You can use one to learn the format, but collect your own patterns for the final project. Copied files are tiny and invented, examiners recognise them, and they give you no honest test results.

How should I split the data into training and testing?

Hold out every 5th pattern from each intent with at least 5 patterns before you train, and never edit those test patterns. A second fresh test set from new people makes the evaluation stronger.

Why does my bot answer off-topic questions with a random intent?

A classifier always picks the closest intent. Add a fallback intent and a confidence threshold, then test with 10 to 15 out-of-scope questions to check they reach the fallback.

Does the intents file checker send my data anywhere?

No. It runs entirely in your browser and nothing is sent or saved.

Keep reading

Related guides

📘

Chatbot AI Online After a Business Change: Update Prices, Hours and Policies Everywhere Your Bot Repeats Them (Free Change Ripple Finder)

Read the guide →

🧭

Chatbot Answers That Fit a Phone Screen: Length, Order and Splitting, With a Free Bubble Fitter

Read the guide →

🛠️

Chat With Customers Right to the Finish: How to Close Every Chat With a Recap, a Next Step and a Clear Owner (Free Wrap-Up Builder)

Read the guide →

More to read

More guides on this topic

📘

Buy Chatbot for Website Plans Without Regret: Buy, Build or Hire, What to Get in Writing, and a Pay-or-Wait Check Before Checkout

Read the guide →

From project dataset to a real bot

Put your tested answers to work on a real website with an AI Agent, a keyword bot and a team inbox. Start free on livechatbot.in.