Skip to content

Types of Searches

You can choose between these search types to integrate into your apps:

You can switch between these by changing a single parameter search_type in your Search Documents API request.

In addition, Gainly also offers you the AI-generated answer functionality via:

How to Choose the Right Search Type

Example: Natural Language Question vs. Keywords

Natural Language Question: what are the benefits of alpaca fleece?

Keywords: alpaca fleece benefits

flowchart TD
    Start([Start]) --> Q0{In response to user's query, would you like to show a single answer<br/>or list of results?}

    Q0 -->|"Single answer"| R[<strong>RAG</strong>]
    Q0 -->|"List of results"| Q1{Will your users primarily search using natural language questions, or keywords?}

    Q1 -->|"Natural Language<br/>Questions"| Q2{Need keyword<br/>matching too?}
    Q1 -->|"Mix of Both<br/>\(or Not Sure\)"| H[<strong>Hybrid Search</strong>]
    Q1 -->|"Keywords"| Q3{Need semantic<br/>understanding?}

    Q2 -->|Yes| H
    Q2 -->|No| S[<strong>AI-Semantic Search</strong>]

    Q3 -->|Yes| H
    Q3 -->|No| L[<strong>Lexical Search</strong>]

    H -->|Fine-tune with| P[hybrid_search_ai_ratio<br/>parameter]

    click H "../hybrid-search/" "Go to Hybrid Search Documentation"
    click S "../ai-semantic-search/" "Go to AI-Semantic Search Documentation"
    click L "../lexical-search/" "Go to Lexical Search Documentation"
    click R "../rag-retrieval-augmented-generation/" "Go to RAG Documentation"