Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
raink — Use LLMs for document ranking | Kitploit
工具/GitHubGitHub/bishopfox/raink
Vulnerability AnalysisMachine LearningAI Security
GitHubbishopfox/raink

raink

Use LLMs for document ranking

查看仓库
17861年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

标志
使用 LLM 进行文档排名。

描述

AI 的力量在于,你可以“把问题扔给它”,然后得到一些结果,甚至不需要完全定义问题。例如,给它一堆代码差异(code diffs)和一份安全公告,然后问:“这些差异中哪一个最有可能修复这个安全漏洞?”然而,事情并不总是那么容易:

  • 非确定性:并非总是返回相同的结果
  • 上下文窗口:无法一次性传入所有数据,需要拆分
  • 输出约束:有时不会返回你要求它审查的所有数据
  • 评分的主观性:很难为单个项目分配数值评分

我们构建了 raink 来规避这些问题,并解决那些对 LLM 来说难以处理的通用排序问题。请参阅我们的博客文章 raink:使用 LLM 进行文档排名 了解该技术的更多背景,并观看我们的演讲 Patch Perfect:与 LLM 配合发现安全漏洞 了解我们如何将 raink 应用于进攻性安全问题。

快速开始

安装

root@kitploit:~
git clone https://github.com/bishopfox/raink
cd raink
go install

配置

设置你的 OPENAI_API_KEY 环境变量。

用法

root@kitploit:~
raink  -h
Usage of raink:
  -f string
    	Input file
  -p string
    	Initial prompt
  -r int
    	Number of runs (default 10)
  -s int
    	Batch size (default 10)

不到 2 分钟即可比较 100 个句子。

root@kitploit:~
raink \
    -f testdata/sentences.txt \
    -r 10 \
    -s 10 \
    -p 'Rank each of these items according to their relevancy to the concept of "time".' |
    jq -r '.[:10] | map(.value)[]' |
    nl

   1  The train arrived exactly on time.
   2  The old clock chimed twelve times.
   3  The clock ticked steadily on the wall.
   4  The bell rang, signaling the end of class.
   5  The rooster crowed at the break of dawn.
   6  She climbed to the top of the hill to watch the sunset.
   7  He watched as the leaves fell one by one.
   8  The stars twinkled brightly in the clear night sky.
   9  He spotted a shooting star while stargazing.
  10  She opened the curtains to let in the morning light.

附录

另请参阅

  • raink:使用 LLM 进行文档排名
  • Patch Perfect:与 LLM 配合发现安全漏洞
  • 大型语言模型借助成对排序提示成为有效的文本排序器
  • 介绍 Rerank 3.5:精准 AI 搜索

待办事项

  • 并行化每次运行的 openai 调用
  • 使用更短的哈希 ID 以节省时间
  • 确保每次随机运行均匀分成若干组,使每个项目都被包含/暴露
  • 允许指定输入 目录(其中每个文件是独立对象)
  • 如果传入的上下文窗口超大则发出警报
  • 每次运行快要结束时,某些批次(第 9 个?)不知为何规模较小
  • 运行 openai 批处理模式
  • 自动计算最佳批次大小?
  • 探索“锦标赛”排序与每次完全暴露的对比
  • 添加细化比率参数
  • 添加博客链接
  • 支持非 OpenAI 模型
  • 添加布尔细化标志

许可证

本项目采用 MIT 许可证 授权。

下载工具