All projects

NLP and retrieval

Multilingual RAG Chatbot with Hate Speech Detection

A retrieval-augmented chatbot is only as safe as the documents it can retrieve. This one moderates content on the way in, so toxic or invalid text never becomes searchable.

How the data moves

  1. Multilingual documents10+ languages
  2. Ingestion and preprocessingBatch and real-time pipelines
  3. Hate speech detectionModeration as a quality filter
  4. EmbeddingsGenerated for validated data only
  5. Vector storeOnly clean content reaches it
  6. Retrieval and answerLow-latency inference path

AWSCloud-ready deployment configuration with end-to-end observability through CloudWatch.

What this covers

  • Scalable batch and real-time pipelines for multilingual document ingestion, preprocessing and moderation, the data backbone of the RAG system.
  • An embedding generation pipeline with hate speech detection built in as a data-quality filtering stage.
  • Retrieval-path data flows optimised for low-latency inference.
  • Cloud-ready infrastructure configuration on AWS, observable end to end through CloudWatch.

Design decisions

Moderate before you embed

Hate speech detection sits in front of the embedding step. Content that fails never gets a vector, so retrieval cannot surface it.

Treat the data path as the product

In a RAG system, what goes into the index shapes every answer. Ingestion, preprocessing and moderation are pipelines with their own quality gates, not one-off scripts.

Keep the retrieval path short

The flow from query to retrieved context was optimised for latency, because a slow answer in a chat interface feels like a broken one.