
Use LLMs for document ranking
दस्तावेज़ रैंकिंग के लिए LLM का उपयोग करें।
एआई में शक्ति है कि आप "इस पर एक समस्या फेंक सकते हैं" और समस्या को पूरी तरह से परिभाषित किए बिना भी कोई परिणाम प्राप्त कर सकते हैं। उदाहरण के लिए, इसे कुछ कोड डिफ्स और एक सुरक्षा सलाह दें, और पूछें, "इनमें से कौन सा डिफ सुरक्षा बग को ठीक करने की सबसे अधिक संभावना है?" हालांकि, यह हमेशा इतना आसान नहीं होता:
हमने उन मुद्दों को दरकिनार करने और सामान्य रैंकिंग समस्याओं को हल करने के लिए raink बनाया है, जो अन्यथा LLM के लिए संसाधित करना कठिन होती हैं। इस तकनीक की पृष्ठभूमि के लिए हमारा ब्लॉग पोस्ट raink: दस्तावेज़ रैंकिंग के लिए LLM का उपयोग करें देखें, और यह देखने के लिए हमारी वार्ता Patch Perfect: सुरक्षा कमजोरियों को खोजने के लिए LLM के साथ सामंजस्य देखें कि हमने raink को आक्रामक सुरक्षा समस्याओं पर कैसे लागू किया है।
git clone https://github.com/bishopfox/raink
cd raink
go install
अपना OPENAI_API_KEY पर्यावरण चर सेट करें।
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)
100 वाक्यों की तुलना 2 मिनट के भीतर करता है।
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.
यह प्रोजेक्ट MIT लाइसेंस के तहत लाइसेंस प्राप्त है।