Commit graph

11 commits

Author SHA1 Message Date
dhruvnathawani
7de879acfa
docs: add Enterprise Text-to-SQL and Search Agent recipes (#395)
feat: add Nemotron Super Text-to-SQL and Search Agent recipes
Add two new recipes derived from the Nemotron Super post-training pipelines:
Nemotron Super Text-to-SQL:
- Five-stage pipeline: seeding, prompt generation, schema with distractors,
  dialect-specific SQL, validation + quality scoring
- 14 conditional samplers (10 industries, 50 topics, complexity-gated task
  types, data quality concepts, knowledge dependencies, 100 style combos)
- Dialect-specific prompts for SQLite, MySQL, and PostgreSQL
- 5 LLM judges (prompt, SQL, context, data quality, knowledge) with 15
  scoring dimensions and flat score extraction columns
- Per-dialect syntax validation via CodeValidatorParams
Nemotron Super Search Agent:
- Four-stage pipeline: Wikidata KG seed paths, two-stage riddle generation
  (draft + BrowseComp-style obfuscation), Tavily web search trajectories
  via MCP, structured JSON formatting
- Tavily hosted MCP endpoint (streamable_http) -- no local server or extra
  dependencies beyond data-designer
- Full tool-call trace capture (with_trace=ALL_MESSAGES) for SFT data
- Built-in demo seeds (3 Wikidata paths) for quick testing
Both recipes include ASCII pipeline diagrams, Nemotron Super context in
docstrings, dev note links in the markdown pages, and follow existing
recipe conventions (PEP 723 metadata, --model-alias/--num-records/
--artifact-path CLI args).
2026-03-11 11:19:58 -07:00
Johnny Greco
f74f25872c
chore: quiet tool call logs and add tool usage statistics (#293)
* add tool usage statistics tracking

- Add ToolUsageStats class with metrics for tool calls, turns, and
  statistical aggregates (mean/stddev per generation)
- Extend ModelUsageStats to include tool_usage tracking
- Update ModelFacade.generate() to track total tool calls and turns
- Update tests with tool_call_count method and new assertions

* silence noisy mcp logs

* log message updates

* add tools enabled info message

* exclude empty tool_usage from usage stats output

* add tool usage summary logging after column generation

- Track tool usage snapshots before/after column processing
- Log mean tool calls per generation for columns with tools enabled
- Add get_tool_usage_snapshot/get_tool_usage_delta methods to ModelRegistry
- Remove unused extra_info parameter from progress_tracker.log_start()
- Add comprehensive tests for ToolUsageStats

* pretty format model usage logs

* reuse stubs and fixtures

* add merge method to ToolUsageStats for accurate stats aggregation

The previous implementation used extend() to combine tool usage stats,
but extend() is designed for single generation data. This caused
incorrect stddev calculations when merging stats from multiple sources.

- Add ToolUsageStats.merge() that properly combines sum-of-squares
- Update ModelUsageStats.extend() to use merge() for tool usage
- Add tests verifying stddev accuracy after merging

* fix tool usage stats missing generations_with_tools count

When tracking tool usage after generation, the ToolUsageStats was
created without setting generations_with_tools, causing the usage
summary to report zeros for calls/gen and turns/gen metrics.

* fix tool usage delta objects returning incorrect stddev values

- Simplify facade API to use tool_usage.extend() directly
- Return NaN for stddev when sum of squares wasn't tracked
- Add docstring to get_tool_usage_delta explaining NaN behavior
- Add comprehensive tests for stddev variance calculation

* fix tool usage delta stddev by including sum of squares in deltas

Convert sum_of_squares_turns and sum_of_squares_calls from private
attributes to public fields, enabling them to be included in delta
calculations. This allows get_tool_usage_delta to return objects that
compute accurate stddev values instead of NaN.

* fix test to use get_tool_usage_snapshot for accurate stddev tracking

The test was manually constructing a ToolUsageStats snapshot without
sum_of_squares fields, causing stddev to be NaN. Now uses the proper
snapshot method that includes all fields needed for delta calculations.

* use nvidia-reasoning by default

* mean -> average in log message

* refactor log indentation to use centralized LOG_INDENT constant

- Add LOG_INDENT constant to logging.py for consistent indentation
- Replace hardcoded "  |-- " strings across all log statements
- Add tool alias and MCP provider info to pre-generation logs
- Improve model usage log format for better consistency
- Update tests to match new log formats

* simplify usage stats dict access in model registry

Remove defensive .get() calls and unnecessary type casts since
the usage statistics dictionary structure is now guaranteed.

* walrus baby

* simplify tool usage tracking and reduce log verbosity

- Remove mean/stddev calculations from ToolUsageStats in favor of simple
  counts and generation ratios
- Add total_generations field to track all tool-enabled generations
- Simplify registry log output to show generations ratio (with_tools/total)
- Remove per-column tool usage snapshot/delta logging from column builder
- Track tool usage for all tool-enabled generations, not just those with calls

* format inference parameters as multi-line log output

- Add get_formatted_params() method to BaseInferenceParams
- Add LOG_DOUBLE_INDENT constant for nested indentation
- Update log_pre_generation() to display each parameter on its own line

* update tests to use LOG_INDENT constants

Align test assertions with the centralized log indentation
constants introduced in the logging module refactor.

* two-space consistency
2026-02-05 10:14:02 -05:00
Johnny Greco
4e89c2f9f3
standardize recipe script metadata (#292) 2026-02-04 10:43:27 -05:00
Eric W. Tramel
532d21a8d7
feat: add extract_reasoning_content option to LLM columns (#285) 2026-02-03 10:25:24 -05:00
Eric W. Tramel
510761107b
feat: Add TraceType enum for granular trace control (#284) 2026-02-02 19:43:51 -05:00
Eric W. Tramel
7248b9fc8f
Update trace normalization to ChatML content blocks (#283) 2026-02-02 18:22:16 -05:00
Eric W. Tramel
e6e58e692e
feat: MCP (Model Context Protocol) tool calling integration for LLM columns (#248) 2026-02-02 09:41:58 -05:00
Johnny Greco
ae0665fa16
refactor: slim package refactor into three subpackages (#240)
* remove old structure

* major shuffle

* streamline project configs

* update make commands

* updates to make commands

* remove essentials

* initialize logger in interface

* uv lock

* ignore notepad

* update workflows

* fix e2e project config

* generate colab notebooks

* resolve default model settings in interface

* fix build commands

* update perf import make command

* cleaning up some slop

* update recipes

* move conftest files to tests/

* update subpackage readmes

* streamline config_logging

* use exports

* update perf import usage pattern

* update for IDE behavior with ruff

* remove engine's fixtures file

* add note to about lazy imports

* update dependencies

* update docs

* doc fixes

* uv lock

* updates to catch up with main

* clean up makefile

* remove package gitignores

* define deps only once

* isolate tests

* add test for protetion rule

* create temp dirs for isolated tests

* catch up to main

* update headers

* re apply changes

* better result summaries for isolated tests

* move exports into top-level init

* fix client importlib version syntax

* catch up with main
2026-01-27 13:53:20 -05:00
Johnny Greco
910d22dfa0
chore: add make commands to run examples as e2e tests (#199)
* update makefile

* fix bug
2026-01-12 15:37:00 -05:00
Johnny Greco
57b5f6f798
set up initial recipe section (#114) 2025-12-10 14:51:07 -05:00
Johnny Greco
42b089e0f4
docs: establish doc templating, building, and strategy (#31)
* initial updates with jupyter tutorials and styling

* filling out some docs

* add blank index

* update docs workflow

* clean up style sheet
2025-11-12 17:04:50 -05:00