JevMade hello@JevMade.com
← Back to guides

JevMade field notes / Retrieval walkthrough

Sorting legal search results to put the best answers first

This guide tests a way to improve search results. It uses a basic search to find a few possible documents, then asks an AI tool to score and sort them to bring the best answers to the top.

Original by TypeSafe AIRetrieval

Listen to this guide

JevMade’s plain-English explanation

0:00 /

AI narration

Credits

“Re-ranking” by TypeSafe AI. Read the original source.

This expanded guide is an AI-narrated adaptation prepared by JevMade. It expands the source’s essential ideas, examples and caveats in JevMade’s own words and is not a word-for-word reading. The synthetic voice does not imitate the author or imply their endorsement.

Our summary

This guide explores how to help an AI assistant find specific legal documents in a large collection. Searching every file takes too much time and computing power. Instead, a person can use a fast, basic search to create a smaller list of likely options before looking closer.

After the basic search builds a short list, an AI tool named Jev steps in. Jev is software that chooses from options rather than writing an answer. It scores how well each document matches the user's request. The system then sorts the list so the highest scores appear first.

This method helps developers manage large document collections. To connect the software, they need an API key, which acts as a private access code. However, every extra document requires another AI decision, increasing costs. The AI also cannot score documents the basic search missed.

Key takeaways

  1. Use a fast, cheap search method to narrow down documents before using a more complex AI tool.
  2. Look at how often the right answer appears in the top ten results, not just the first spot.
  3. Remember that scoring every document on a short list requires a separate decision that adds to your costs.

In a test with forty legal questions, the correct document's appearance in the top spot rose from 5 to 18 percent, and its appearance in the top ten rose from 38 to 62 percent. These results happened in this specific test and do not guarantee universal accuracy.

TypeSafe cookbook · Source reviewed

Read the original guide Opens the author’s site in a new tab.