Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Find the matching section
Run
from praisonaiagents.knowledge import KeywordIndex lines = [ "Apples grow on trees in the orchard.", "The secret colour of the boat is blue.", "Tickets for the ferry cost four pounds.", ] index = KeywordIndex() index.add_documents(lines) for hit in index.query("boat and ferry", top_k=2): print(hit["text"])
Press Run. The result appears here.
Esc
Search in
All
Docs
University