Mock-up on a synthetic corpus
Document search mock-up on ten contract clauses
A document search mock-up built on ten synthetic contract clauses (confidentiality, personal data, subcontracting, reversibility…), a few lines each. The search compares the term frequencies of the question with those of each clause; it uses no chunking, no vector representation model and no answer generation.
- Scoping
- Ten synthetic clauses; fifteen questions, each linked to the clause that answers it and to the terms the answer must contain.
- Prototype
- Search by term-frequency similarity, on the whole clause; an automatic evaluation checks the clause retrieved and the presence of the expected terms.
- Demonstration
- The right clause comes first for 13 questions out of 15. In-house composite score (0.6 × retrieval + 0.4 × presence of the expected terms): 0.867. This is not a RAGAS evaluation.
Lessons
- Both failures concern questions whose answer is in the corpus (duration of the confidentiality obligation, information to be documented under the GDPR): the term-based search did not bring up the right clause.
- The question set contained no out-of-corpus question: the ability to refuse was not measured.
- A useful evaluation checks both the document retrieved and the content of the answer.
SourcePublic code, data and report: oppdrag-public-pocs, folder poc-001-rag-juridique.