> ## Documentation Index
> Fetch the complete documentation index at: https://relevanceai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Knowledge

> The Get Knowledge feature allows you to search and retrieve information directly from your knowledge table without RAG

## Add the ‘Get Knowledge’ Tool step to your Tool

<div style={{ width:"90%",position:"relative",paddingTop:"75%" }}>
  <iframe src="https://app.supademo.com/embed/cmd2oyxum341oc4kj3skjizmf" frameBorder="0" title="Add the Get Knowledge Tool step to your Tool" allow="clipboard-write; fullscreen" webkitAllowFullscreen="true" mozAllowFullscreen="true" allowFullscreen style={{ position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"3px solid #5E43CE",borderRadius:"10px",objectFit:"cover" }} />
</div>

You can add the Get Knowledge’ Tool step to your Tool by:

1. Creating a new Tool, then clicking `+ Add Step`
2. Searching for and addingthe ‘Get Knowledge’ Tool step
3. Clicking ‘Expand’ to see the full Tool step
4. Selecting the Knowledge table you would like to access
5. Filter condition: “and” vs “or” when matching data to update:
   * Use **and** when all specified conditions must match for a row to be deleted.
   * Use **or** when any of the conditions can match.
   <Note>
     Filter condition only applies if you include more than one object in the filter
   </Note>
6. Filters: Accepts a JSON selection of objects, where each object corresponds to a row. Add more objects as outlined in the formatting examples below to delete multiple rows at once.
7. Click `Run step` to test out the Tool

## Advanced settings

### Fields to include

This is the fields (columns) that will be included in the response. By default, all fields are included.

<Tip> When targeting a specific field, you will need to prefix each field with `data.`. For example, if you have a field name `breed`, you will instead use `data.breed`. </Tip>

### Number of records to retrieve

This is the number of records to retrieve. By default, **20** records are retrieved.

## Common errors

<AccordionGroup>
  <Accordion title="Formatting issues">
    This indicates that there is a formatting issue in the "New data to insert" input field. Make sure your object is formatted correctly. `Expected property name or '}' in JSON at...`
  </Accordion>

  <Accordion title="Incorrect data type">
    This means the data being inserted into the knowledge table is not a JSON. `Invalid JSON`
  </Accordion>
</AccordionGroup>

## Formatting Examples

### Example 1: Retrieve all large dogs

```json theme={null}
[
  {
    "size": "large"
  }
]
```

### Example 2: Retrieve all large French Bulldogs

```json theme={null}
[
  {
    "breed": "French Bulldog",
    "size": "large"
  },
]
```

### Example 3: Retrieve all large dogs OR small poodles

```json theme={null}
[
  {
    "size": "large",
    "breed": "French Bulldog"
  },
  {
    "size": "small",
    "breed": "poodle"
  }
]
```

<Note>
  Ensure to separate each object with a comma if inserting multiple rows.
</Note>

## Using Variables in JSON

You can use variables from Tool inputs and other Tool steps in the **Filters** field. For detailed information on how to use variables in JSON for Knowledge Tool steps, including variable syntax and typing, see [Using Variables in JSON](/build/tools/tool-steps/knowledge/using-variables-in-json).

For Knowledge Tool steps, all variables should be wrapped in quotes in the JSON format: `"{{variable_name}}"`. The filter values will be matched against your knowledge table data based on the column types.

## Frequently asked questions (FAQs)

<AccordionGroup>
  <Accordion title="What is the difference between get knowledge and advanced knowledge search?">
    Get knowledge allows you to search and retrieve information directly from your knowledge table without RAG.
  </Accordion>

  <Accordion title="What format should I use for the filter?">
    The filter should be a JSON array of objects. Each object should have the field name and the value you want to filter by.
  </Accordion>

  <Accordion title="What's the difference between using 'AND' and 'OR'?">
    * Use **AND** when *all* filter conditions must be true for a row to be retrieved.
    * Use **OR** when *any* one of the conditions can match.

    <Note>
      This only applies when you include more than one object in the filter array.
    </Note>
  </Accordion>
</AccordionGroup>
