Workflow · Production

ClippingGPT: RAG-based AI tutor outperforms GPT-4 by 26% on Brazil's diplomatic career exam

The problem

LLMs like ChatGPT operate as language models rather than knowledge bases, making them prone to hallucinations, outdated content, and linguistic bias — rendering them unreliable for high-stakes educational settings where accuracy is essential.

First attempt

GPT-4 alone scored 473.8, finishing at 177th place and failing to qualify in the diplomatic career entrance exam.

Workflow diagram · grounded in source
1
Knowledge base indexing
integration
“split documents into sections (chunks); - transformed each chunk into an embedding”
2
User submits query
trigger
“our user can interact in a conversational way with the model”
3
Query vectorized and chunks ranked
ai_action
“it processes the user input and transforms it into a vector using OpenAI's Embeddings API. It then analyses the distance between the user's query embedding and the embeddings of various chunks. Subsequently, it ranks these chunks based o…”
4
Context-augmented answer generation
ai_action
“the model incorporates these relevant chunks as context into a message sent to GPT. This enriched query is then sent to OpenAI's Completion API, which generates and returns the answer”
5
Blind expert grading
validation
“we asked a group of teachers specialised in preparing candidates for the diplomatic exam to rate the answers without prior knowledge that they were generated by our AI model (blind grading)”
Reported outcome

ClippingGPT, trained on a proprietary knowledge base via embeddings, achieved 23rd place with a score of 597.79, outperforming GPT-4 by 26%.

Reported metrics
ClippingGPT performance gain over GPT-426%
ClippingGPT exam score597.79
ClippingGPT exam ranking23rd place
GPT-4 exam score473.8
Show all 7 reported metrics
ClippingGPT performance gain over GPT-426%
ClippingGPT exam score597.79
ClippingGPT exam ranking23rd place
GPT-4 exam score473.8
GPT-4 exam ranking177th place
Clipping candidate approval rate94%
GPT-4 TruthfulQA accuracy60%
Reported stack
GPT-4OpenAI's Embeddings APIOpenAI's Completion APIRedis
Source
https://medium.com/@rafael_pinheiro/building-with-gpt-for-education-how-we-built-an-ai-tutor-that-aced-the-most-complex-exam-in-latam-19fabf8b746b
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

ClippingGPT, trained on a proprietary knowledge base via embeddings, achieved 23rd place with a score of 597.79, outperforming GPT-4 by 26%.

What tools did this team use?

GPT-4, OpenAI's Embeddings API, OpenAI's Completion API, Redis.

What results were reported?

ClippingGPT performance gain over GPT-4: 26%; ClippingGPT exam score: 597.79; ClippingGPT exam ranking: 23rd place; GPT-4 exam score: 473.8 (source-reported, not independently verified).

What failed first in this deployment?

GPT-4 alone scored 473.8, finishing at 177th place and failing to qualify in the diplomatic career entrance exam.

How is this workflow AI workflow structured?

Knowledge base indexing → User submits query → Query vectorized and chunks ranked → Context-augmented answer generation → Blind expert grading.