A modern AI-powered FAQ chatbot application built to demonstrate Natural Language Processing and intelligent question matching.
CodeAlpha FAQ Chatbot is a native Android application that allows users to ask questions in natural language and receive the most relevant answer from a structured FAQ knowledge base.
The project demonstrates a practical Natural Language Processing workflow using text preprocessing, TF-IDF vectorization, and cosine similarity rather than relying on hardcoded question-and-answer rules or a paid AI API.
This project was developed as part of the CodeAlpha Artificial Intelligence Internship — Task 2: Chatbot for FAQs.
- Natural-language question input.
- FAQ matching using TF-IDF and cosine similarity.
- Best-match answer selection.
- Configurable similarity threshold.
- Graceful fallback for unknown questions.
- Suggested FAQ questions when no confident match is found.
- Browse the available FAQ knowledge base.
- Search through FAQ content.
- Organised FAQ categories.
- Quick access to common questions.
- Clean modern chat interface.
- Conversation history during the session.
- Clear-chat functionality.
- Responsive Jetpack Compose UI.
- Core NLP matching works locally.
- No paid AI API is required.
- No API key is required for the chatbot engine.
- Designed as an educational and portfolio project.
User Question
↓
Text Preprocessing
↓
TF-IDF Vectorization
↓
Cosine Similarity
↓
Best FAQ Match
↓
Similarity Threshold
↙ ↘
Match No Confident Match
↓ ↓
Answer Suggestions
The application converts the user's question and FAQ entries into numerical TF-IDF representations. Cosine similarity is then used to identify the closest FAQ. A threshold prevents weak matches from being presented as confident answers.
| Category | Technology |
|---|---|
| Platform | Android |
| Language | Kotlin |
| UI | Jetpack Compose |
| Design | Material 3 |
| AI / NLP | TF-IDF + Cosine Similarity |
| Architecture | ViewModel-based Android architecture |
| Async Processing | Kotlin Coroutines |
| Reference Implementation | Python + Flask |
| Build System | Gradle + Android Gradle Plugin |
| CI/CD | GitHub Actions |
CodeAlpha_FAQChatbot/
├── app/ # Native Android application
├── CodeAlpha_FAQChatbot/ # Python/Flask reference implementation
├── public/ # Project assets
├── .github/
│ └── workflows/
│ └── build-apk.yml # Automated APK build
├── gradle/
├── build.gradle.kts
├── settings.gradle.kts
├── gradle.properties
├── metadata.json
└── README.md
- Android Studio or a compatible Gradle environment.
- JDK 17.
- Android SDK compatible with the project configuration.
gradle :app:assembleDebugThe generated APK is located at:
app/build/outputs/apk/debug/app-debug.apk
The repository includes an automated GitHub Actions workflow that builds the Android application on pushes to main and through manual workflow dispatch.
The workflow:
- Checks out the source code.
- Configures JDK 17.
- Installs Gradle 9.3.1.
- Creates an isolated CI debug keystore.
- Builds the debug APK.
- Uploads the APK as a workflow artifact.
This allows the project to be built through GitHub Actions without requiring a local development computer for the APK build.
Recommended application screenshots:
screenshots/
├── chatbot.png
├── faq-response.png
├── fallback.png
├── faq-explorer.png
└── search.png
A short demonstration can show:
- The CodeAlpha internship project introduction.
- The chatbot interface.
- A natural-language FAQ question.
- The matched answer.
- An unrelated question and fallback response.
- The FAQ explorer/search experience.
- The GitHub repository and project structure.
Program: CodeAlpha Artificial Intelligence Internship
Task: Task 2 — Chatbot for FAQs
Project Type: AI / Natural Language Processing
Platform: Android
The project is intended to demonstrate practical application of NLP concepts in a complete software project suitable for internship evaluation and portfolio presentation.
- Semantic sentence embeddings.
- Multilingual FAQ support.
- Voice-based questions.
- Analytics for unanswered questions.
- Remote FAQ management.
- More advanced conversational context.
Sabareesh
GitHub: @saba1207B
MIT License
⭐ If you find this project useful, consider starring the repository.