retrieve.Rd
Retrieve documents (chunks of text) from a text store.
retrieve(x, from, ...)
The query, which by default is embedded and used as a query to a vector store based on cosine similarity.
The TextStore as returned by text_store
.
Parameters for the query. By default, the supported parameters are
k
(the number of nearest neighbor documents to return) and
min_similarity
(the minimum allowed cosine similarity of the
returned documents to the query).
A data.frame with a column “text” containing the text of each document, along with any metadata columns.
rag_with
, which implements the full RAG workflow.
The RAG capabilities of wizrd are currently experimental and quite primitive. They may be removed or moved to a different package in the future.
if (FALSE) { # \dontrun{
chunks <- chunk(tools::Rd_db("S7"))
store <- text_store(nomic(), chunks)
retrieve("new_property example", store)
} # }