ontocast.tool.atomic¶
Minimal tool contracts for atomic render/critic loops.
AtomicLLMProvider
¶
Bases: Protocol
Provides budget-aware LLM instances for atomic loop calls.
Source code in ontocast/tool/atomic.py
AtomicSearchProvider
¶
Bases: Protocol
Provides optional web-search retrieval for ontology grounding.
Source code in ontocast/tool/atomic.py
AtomicToolBox
¶
Small tool surface used by atomic render/critic paths.
Configuration arrives as config sections, never as unpacked scalars. An
earlier signature accepted both a :class:WebSearchConfig and seventeen
flat web_search_* parameters mirroring its fields, chosen between by an
if/else; production passed the section and only tests took the flat
branch, so the tested configuration path was not the one that shipped. Each
default also existed three times -- here, in settings.py, and inline at
the read sites. Now settings.py is the single source.
Source code in ontocast/tool/atomic.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
__init__(llm_provider, search_provider=None, web_search_config=None, facts_validation_config=None, citation_vocabulary=None)
¶
Build the atomic tool surface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
llm_provider
|
AtomicLLMProvider
|
Supplies budget-aware LLM tools. |
required |
search_provider
|
AtomicSearchProvider | None
|
Optional web-search backend. Without one, search returns no hits regardless of configuration. |
None
|
web_search_config
|
WebSearchConfig | None
|
Web-grounding settings. Defaults to
:class: |
None
|
facts_validation_config
|
FactsValidationConfig | None
|
Facts-gate settings consumed by the render
and repair paths. Defaults to :class: |
None
|
citation_vocabulary
|
dict[str, str] | None
|
Bibliographic terms for citation-metadata units. Configuration rather than retrieval: a reference list is not domain content, so its vocabulary never reaches the catalog. |
None
|
Source code in ontocast/tool/atomic.py
get_llm_tool(budget_tracker)
async
¶
search(query, max_results=None)
async
¶
Run optional web search and return normalized hits.
Source code in ontocast/tool/atomic.py
web_grounding_enabled_for_node(node)
¶
Return whether web grounding is enabled for a workflow node.