Class RagSearch

java.lang.Object
ai.vectros.types.RagSearch

public final class RagSearch extends Object
  • Method Details

    • getMode

      public Optional<RagSearchMode> getMode()
      Returns:
      Retrieval mode: HYBRID combines keyword and semantic search, SEMANTIC uses vector similarity only, TEXT uses keyword (BM25) matching only. Defaults to HYBRID.
    • getLimit

      public Optional<Integer> getLimit()
      Returns:
      Maximum number of results to retrieve before building the prompt. Defaults to 10; the maximum is 50.
    • getFilters

      public Optional<Map<String,FilterValue>> getFilters()
      Returns:
      Field filters to apply to your indexed content, as a map of field name to required value.
    • getUserId

      public Optional<String> getUserId()
      Returns:
      Restrict retrieval to content owned by this user id.
    • getOrgId

      public Optional<String> getOrgId()
      Returns:
      Restrict retrieval to content owned by this organization id.
    • getClientId

      public Optional<String> getClientId()
      Returns:
      Restrict retrieval to content tagged with this client id.
    • getContentTypes

      public Optional<List<RagSearchContentTypesItem>> getContentTypes()
      Returns:
      Narrow retrieval to specific content types. When omitted, both documents and records are searched — records are valid grounding content too (for example, structured patient data or intake forms). Pass ["documents"] for documents only or ["records"] for records only. Each retrieved result carries a sourceType field indicating which type it is.
    • getFolderId

      public Optional<String> getFolderId()
      Returns:
      Restrict retrieval to content (documents or records) in this exact folder. Folders are a unified organizational primitive and may hold mixed content. Provide the UUID of a folder. To include a folder and all of its descendants instead, use rootFolderId.
    • getRootFolderId

      public Optional<String> getRootFolderId()
      Returns:
      Restrict retrieval to content under this subtree — the folder and all of its descendants. Provide the UUID of a top-level (root) folder. Applies uniformly to documents and records. Use folderId to scope to a single folder exactly.
    • getTypeName

      public Optional<String> getTypeName()
      Returns:
      Restrict retrieval to records of a specific schema type. Applies only to records: setting it implicitly limits results to records unless contentTypes also includes documents, in which case documents are still returned unfiltered.
    • getCreatedAfter

      public Optional<String> getCreatedAfter()
      Returns:
      Restrict retrieval to content created at or after this ISO-8601 UTC timestamp. Useful for incremental retrieval (for example, answering based only on content ingested today). Pair with createdBefore to define a time window.
    • getCreatedBefore

      public Optional<String> getCreatedBefore()
      Returns:
      Restrict retrieval to content created at or before this ISO-8601 UTC timestamp. Pair with createdAfter to define a time window, or use alone to scope retrieval to content older than a cutoff.
    • getRequireComplete

      public Optional<Boolean> getRequireComplete()
      Returns:
      Require complete retrieval. When true, if a search backend is unavailable the request returns HTTP 503 before any answer is streamed, rather than grounding the answer on partial results. Defaults to false, in which case an outage degrades to the surviving search engine and the search_results event reports degraded: true. Set this to true when an answer grounded on incomplete retrieval is unacceptable.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static RagSearch.Builder builder()