> For the complete documentation index, see [llms.txt](https://docs.sov.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sov.ai/api-reference/tools.md).

# Tools (SEC, Explain)

**Module:** `sovai.get_tools`

## Functions

### `sec_search()`

```python
def sec_search(search = 'CFO Resgination')
```

***

### `sec_filing()`

```python
def sec_filing(ticker = 'AAPL', form = '10-Q', date_input = '2023-Q3', verbose = False)
```

***

### `code()`

```python
def code(prompt = 'get bankruptcy data for Tesla', verbose = False, run = False)
```

***

### `sec_graph()`

```python
def sec_graph(
    ticker: str = 'AAPL',
    date: str = '2024-Q3',
    verbose: bool = False,
    ontology_type: str = 'causal',
    oai_model: str = 'gpt-4o-mini',
    batch: bool = True,
    batch_size: int = 10,
    sentiment_filter: Optional[Union[float, bool]] = None,
    output_dir: str = './docs',
    use_cache: bool = True,
) -> pd.DataFrame
```

Generate a knowledge graph from 10-K SEC filings for a given ticker using the specified ontology type.

**Parameters**

| Parameter          | Type                           | Description                                                                                                                               |
| ------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `ticker`           | `str`                          | Ticker symbol (e.g., AAPL for Apple Inc.)                                                                                                 |
| `date`             | `str`                          | Filing date or quarter (default: "2024-Q3").                                                                                              |
| `verbose`          | `bool`                         | Whether to print detailed logs.                                                                                                           |
| `ontology_type`    | `str`                          | The ontology type to use for analysis. Choose from: - "connection", "causal", "temporal", "stakeholder", "innovation", "esg", "sentiment" |
| `oai_model`        | `str`                          | OpenAI model to use (default: "gpt-4o-mini").                                                                                             |
| `batch`            | `bool`                         | Whether to process documents in batches.                                                                                                  |
| `batch_size`       | `int`                          | Number of documents to process in a batch (default: 10).                                                                                  |
| `sentiment_filter` | `Optional[Union[float, bool]]` | Filter by sentiment scores or leave as None for no filter.                                                                                |
| `output_dir`       | `str`                          | Directory to save graph outputs (default: "./docs").                                                                                      |
| `use_cache`        | `bool`                         | Whether to use cached results to speed up analysis.                                                                                       |

**Returns**

* pd.DataFrame: DataFrame representing the generated graph with nodes and relationships.

***
