{
  "tool_id": "sec_filing_chunk_optimizer",
  "slug": "sec-filing-chunk-optimizer",
  "path": "/sec-filing-chunk-optimizer/",
  "mode": "client_side",
  "usage": "Client-side calculator. Open https://aifinhub.io/sec-filing-chunk-optimizer/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aifinhub.io/engines/sec-filing-chunk-optimizer.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aifinhub.io/methodology/sec-filing-chunk-optimizer/",
  "sample_input": {
    "tool": "sec_filing_chunk_optimizer",
    "archetype_id": "10k-body",
    "chunk_size": 1024,
    "overlap_pct": 0.1,
    "strategy": "structural",
    "embedding_model_id": "openai-embed-3-small",
    "query_reembed_count": 100
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "archetype_id": {
        "type": "string"
      },
      "chunk_size": {
        "type": "number"
      },
      "overlap_pct": {
        "type": "number"
      },
      "strategy": {
        "type": "string"
      },
      "embedding_model_id": {
        "type": "string"
      },
      "query_reembed_count": {
        "type": "number"
      }
    },
    "required": [
      "tool",
      "archetype_id",
      "chunk_size",
      "overlap_pct",
      "strategy",
      "embedding_model_id",
      "query_reembed_count"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "archetype": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "approxTokens": {
            "type": "integer"
          }
        }
      },
      "embedding": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "usdPerMToken": {
            "type": "number"
          }
        }
      },
      "strategy": {
        "type": "string",
        "enum": [
          "structural",
          "recursive",
          "semantic"
        ]
      },
      "chunkCount": {
        "type": "integer"
      },
      "avgTokens": {
        "type": "number"
      },
      "minTokens": {
        "type": "integer"
      },
      "maxTokens": {
        "type": "integer"
      },
      "tokensIngested": {
        "type": "integer"
      },
      "embeddingCostOnce": {
        "type": "number"
      },
      "embeddingCostPer100Queries": {
        "type": "number"
      },
      "warnings": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "strategyNotes": {
        "type": "string"
      }
    }
  }
}
