컴파일된 AI: LLM 기반 워크플로우 자동화를 위한 결정론적 코드 생성
Compiled AI: Deterministic Code Generation for LLM-Based Workflow Automation
본 연구에서는 '컴파일된 AI'라는 패러다임을 연구합니다. 이 패러다임은 대규모 언어 모델이 컴파일 단계에서 실행 가능한 코드 아티팩트를 생성하며, 이후 워크플로우가 추가적인 모델 호출 없이 결정론적으로 실행됩니다. 이 패러다임은 선행 연구인 선언적 파이프라인 최적화(DSPy) 및 하이브리드 신경-기호 계획(LLM+P)에서 그 기원을 찾을 수 있습니다. 본 연구는 이 패러다임을 고위험 기업 워크플로우, 특히 신뢰성과 감사 가능성이 중요한 의료 환경에 적용하는 시스템 중심적인 연구입니다. 컴파일된 AI는 검증된 템플릿에 내장된 좁은 비즈니스 로직 함수로 생성을 제한함으로써, 런타임 유연성을 희생하고 예측 가능성, 감사 가능성, 비용 효율성 및 보안 노출 감소를 얻습니다. 본 연구에서는 (i) 제약 조건이 있는 LLM 기반 코드 생성 시스템 아키텍처, (ii) 확률적 모델 출력을 실제 운영 환경에서 사용할 수 있는 코드 아티팩트로 변환하는 4단계 생성 및 검증 파이프라인, 그리고 (iii) 토큰 사용량, 결정론, 신뢰성, 보안 및 비용을 포함하는 운영 지표를 측정하는 평가 프레임워크를 제시합니다. 본 연구는 두 가지 작업 유형, 즉 함수 호출(BFCL, n=400) 및 문서 지능(DocILE, n=5,680개의 송장)에 대한 평가를 수행했습니다. 함수 호출 작업에서 컴파일된 AI는 96%의 작업 완료율을 0개의 실행 토큰으로 달성했으며, 이는 런타임 추론과 거의 동일한 성능을 보였고, 1,000개의 트랜잭션에서 토큰 사용량을 57배 줄였습니다. 문서 지능 작업에서, 저희가 개발한 Code Factory 변형은 주요 필드 추출(KILE: 80.0%)에서 Direct LLM과 동등한 성능을 보였으며, 항목 인식 정확도(LIR: 80.4%)에서 가장 높은 정확도를 달성했습니다. 135개의 테스트 케이스에 대한 보안 평가 결과, 프롬프트 주입 탐지에서 96.7%의 정확도를, 정적 코드 안전성 분석에서 87.5%의 정확도를 보였으며, 오탐은 없었습니다.
We study compiled AI, a paradigm in which large language models generate executable code artifacts during a compilation phase, after which workflows execute deterministically without further model invocation. This paradigm has antecedents in prior work on declarative pipeline optimization (DSPy) and hybrid neural-symbolic planning (LLM+P); our contribution is a systems-oriented study of its application to high-stakes enterprise workflows, with particular emphasis on healthcare settings where reliability and auditability are critical. By constraining generation to narrow business-logic functions embedded in validated templates, compiled AI trades runtime flexibility for predictability, auditability, cost efficiency, and reduced security exposure. We introduce (i) a system architecture for constrained LLM-based code generation, (ii) a four-stage generation-and-validation pipeline that converts probabilistic model output into production-ready code artifacts, and (iii) an evaluation framework measuring operational metrics including token amortization, determinism, reliability, security, and cost. We evaluate on two task types: function-calling (BFCL, n=400) and document intelligence (DocILE, n=5,680 invoices). On function-calling, compiled AI achieves 96% task completion with zero execution tokens, breaking even with runtime inference at approximately 17 transactions and reducing token consumption by 57x at 1,000 transactions. On document intelligence, our Code Factory variant matches Direct LLM on key field extraction (KILE: 80.0%) while achieving the highest line item recognition accuracy (LIR: 80.4%). Security evaluation across 135 test cases demonstrates 96.7% accuracy on prompt injection detection and 87.5% on static code safety analysis with zero false positives.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.