DigiTransact AI
Field guide Cohere

Find the right school help-desk note with Cohere Rerank

DigiTransact AI

A trainee in Tamale asks where to collect a replacement ID. The help desk has one note about paying for a card and another about collecting it. Both mention replacements, but only one saves the trainee a wasted trip. Use Cohere Rerank to test which note your search would put first.

Decide what counts as a useful match

For this worked example, take two fictional notes in this order: ‘Pay for a replacement ID at the accounts desk’ and ‘Collect your printed card from the library counter’. Write down the question: ‘My replacement ID is ready. Where do I pick it up?’ Before trying the tool, mark the library note as the expected first result. The accounts note shares more words with the question but sends the learner to the wrong desk.

Send a question and a list, not a chat prompt

Open the Try it panel in Cohere’s Rerank API reference. You need an authorised Cohere API key. Use the authentication control for the key; keep it out of the notes. Choose an available Rerank model for the model field. Enter the learner’s question under query, supply the notes as separate strings under documents, and set top_n to 1.

Read the index in the first result. Counting starts at zero, so an index of 1 points back to the library note. This is a ranking, not a reply to forward: read the note itself before advising the learner. If the office has moved, even a perfectly ranked old note gives the wrong directions.

Test a change in meaning

Keep the same notes and change only the question to ‘Where do I pay for my replacement?’ Now the accounts desk should come first. Record both predictions and both returned indices. Keeping the documents fixed lets you see whether the search responds to the difference between paying and collecting.

Keep learning