GithubHelp home page GithubHelp logo

zulihit / rag_benchmark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whateverisnottaken/rag_benchmark

0.0 0.0 0.0 237 KB

This is a public benchmark repository for evaluating RAG tools.

Python 100.00%

rag_benchmark's Introduction

补全RAG model测试代码

将句子转化为向量使用的是multilingual BERT model,如下 model = SentenceTransformer('distiluse-base-multilingual-cased')

custom_test.py中包含补全的代码

通过句子相似度计算进行排序完成

针对custom_top10

直接运行'score.py'也可以获得结果,使用distiluse-base-multilingual-cased的召回结果为 top 1 recall: 0.37623762376237624 top 3 recall: 0.5346534653465347 top 5 recall: 0.6336633663366337 top 10 recall: 0.7475247524752475

针对check_information

这里设置当COS相似度大于0.5即视为包含了相同的信息,可以根据实际情况修改该超参数

针对get_answer

将相似度最大的结果输出

这里没有实际使用LLM进行测试

rag_benchmark's People

Contributors

whateverisnottaken avatar zulihit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.