전체 아키텍처 구조도
개요
프롬프팅은 LLM 출력 품질을 결정하는 핵심 요소이며, 사용 방식에 따라 크게 두 가지 접근으로 나뉜다.
| 항목 | 싱글턴 프롬프팅 | 컨텍스트 프롬프팅 |
|---|---|---|
| 방식 | 하나의 독립된 입력으로 완결된 응답 생성 | 이전 대화·상태·정보를 포함해 누적된 맥락 활용 |
| 상태 | Stateless (무상태) | Stateful-like (상태 유지) |
| 재현성 | 높음 | 낮음 / 유연성 높음 |
| Ontology 활용 | 프롬프트 내 명시적 정의 | 공유 컨텍스트로 지속 참조 |
싱글턴 프롬프팅 (Single-Turn Prompting)
하나의 프롬프트 안에 필요한 모든 정보를 포함하여, 모델이 단일 요청만으로 결과를 생성하도록 하는 방식. 입력과 출력 관계가 1:1이며 이전 대화나 상태를 고려하지 않는다.
- ›명확성: 프롬프트 자체에 모든 조건 포함
- ›재현성: 동일 입력 → 동일 출력
- ›디버깅 용이: 문제 원인 즉시 추적
- ›API 단발성 요청에 효율적
- ›긴 입력 필요 (모든 정보 포함)
- ›복잡한 작업에서 비효율적
- ›상태 유지 불가
컨텍스트 프롬프팅 (Contextual Prompting)
이전 대화, 시스템 지시문, 외부 정보 등을 포함하여 맥락(context)을 누적하면서 응답을 생성하는 방식. 사실상 상태 기반 추론(stateful reasoning)이다.
- ›시스템 프롬프트
- ›최근 대화 히스토리
- ›사용자 선호 / 개인화 정보
- ›Ontology: 객체·관계·허용 행동
- ›도구 실행 결과
- ›검색 결과 / 중간 초안
- ›메모리에서 불러온 정보
- ›워크플로 상태값
핵심 비교
| 항목 | 싱글턴 | 컨텍스트 |
|---|---|---|
| 구조 | 단일 요청 | 다중 턴 |
| 상태 | 없음 (Stateless) | 있음 (Context-aware) |
| 재현성 | 높음 | 낮음 |
| 복잡도 대응 | 낮음 | 높음 |
| 토큰 사용 | 효율적 | 누적됨 |
| Ontology | 프롬프트 내 명시 | 공유 컨텍스트로 지속 참조 |
| 대표 용도 | 단순 작업 / 자동화 | 대화형 / 복잡 작업 |
Ontology Layer
Ontology Layer는 에이전트가 세계를 이해하는 공통 언어다. 단순한 데이터 스키마가 아니라, 객체 간 관계와 허용 행동까지 정의한다.
- ›각 에이전트가 "고객"을 다르게 해석
- ›데이터 구조 불일치
- ›허용되지 않은 행동 임의 시도
- ›모든 에이전트가 동일한 객체 정의 공유
- ›인터페이스 자동 정합
- ›Governance 자동 적용
서브에이전트 (Sub-Agent)
서브에이전트는 복잡한 문제를 분해하고 담당 영역별로 처리하는 역할을 가진 에이전트다.
Executor계획에 따라 내용 생성
Reviewer오류·누락·모순 점검
Synthesizer통합 서술
Critic근거 부족·과장 지적
Biz비즈니스 관점
Risk리스크 검토
Branch BReasoning 경로 2
Merge최적 경로 선택
스킬 에이전트 (Skill Agent)
스킬 에이전트는 특정 기능(툴·API·계산 등)을 수행하는 실행 단위 에이전트다.
| 스킬 유형 | AIP 레이어 | 예시 |
|---|---|---|
| Search | Data Services | 웹 검색 / RAG / Vector DB 조회 |
| Code Execution | AI Services | Python / SQL 실행, 코드 테스트 |
| API Call | Data Services | CRM 조회, 캘린더, 이메일, 결제 |
| Memory Access | Data Services | 단기/장기 메모리 저장·조회 |
| Pipeline Trigger | Workflow Services | 자동화 파이프라인 실행 |
| Notification | Workflow Services | 알림 발송, 이벤트 트리거 |
| 항목 | 서브에이전트 | 스킬에이전트 |
|---|---|---|
| 본질 | 역할 기반 추론 단위 | 기능 기반 실행 단위 |
| 초점 | Reasoning (사고) | Action (행동) |
| Ontology 활용 | Object·Relation 참조해 분해 | Action 정의 참조해 실행 |
| 실패 유형 | 논리 비약, 누락 | 호출 실패, 포맷 오류 |
| AIP 레이어 | AI Services | Data / AI / Workflow Services |
구현 패턴
자주 생기는 실패 패턴
좋은 설계 원칙
- ›단순하게 시작 — direct_answer / research / review 3가지로. Ontology도 핵심 Object 3~5개부터.
- ›출력 구조화 — 자유서술보다 JSON schema 고정이 안정적.
- ›검증은 별도 단계 — 생성과 검증을 같은 단계에 넣으면 누락이 많다.
- ›툴은 필요한 순간에만 — Ontology Action 정의를 기준으로 판단.
- ›Ontology는 독립 레이어로 — 모든 에이전트가 동일하게 참조하는 단일 소스.
- ›최종 응답은 사용자 언어로 — 내부 구조화와 무관하게 사용자 관점으로 재구성.
최종 종합 정리
| 요소 | 핵심 역할 | AIP 레이어 | 한 줄 요약 |
|---|---|---|---|
| 싱글턴 프롬프팅 | 독립적 단일 호출 | AI Services 내부 | 한 번에 정확하게 끝내는 방식 |
| 컨텍스트 프롬프팅 | 누적 상태 기반 연속 처리 | Ontology + AI Services | 대화를 통해 점진적으로 완성 |
| Ontology Layer | 에이전트 간 공통 세계 모델 | 독립 레이어 | 모든 에이전트가 같은 언어로 세계를 이해 |
| 서브에이전트 | 역할별 사고 분해 | AI Services | 문제를 나눈다 — 추론 단위 |
| 스킬 에이전트 | 검색·계산·API 등 실행 | Data / AI / Workflow | 행동을 수행한다 — 실행 단위 |
| 오케스트레이터 | 전체 흐름 제어 및 통합 | AI Services + Ontology | 전체를 조율한다 — 제어층 |
| Security & Governance | 정책 적용 / 감사 | 독립 레이어 | 허용된 범위 안에서만 동작하게 보장 |
결론
좋은 LLM 시스템은 "프롬프트를 잘 쓰는 시스템"이 아니라,
Ontology로 세계를 정의하고, 문제를 올바르게 분해하고,
필요한 도구를 적절히 호출하고, 결과를 검증해서 다시 조립하는 시스템이다.
Singleton · Contextual · Ontology · Sub-Agent · Skill Agent · Orchestrator
SideSeat(밋업 연결 앱)의 AI 에이전트 워크플로를 위한 Control Plane 구현체다. 에이전트가 데이터베이스에 직접 접근하지 않고, 반드시 거버넌스가 적용된 Ontology Layer를 통해서만 동작하도록 강제한다.
시스템 컨텍스트 블록도
에이전트 실행 루프 (Think → Act → Observe)
5-Layer 에이전트 스캐폴딩
모든 에이전트는 동일한 5개 레이어 스택으로 구성된다.
Ontology Layer 구현 (SideSeat 도메인)
에이전트는 raw SQL을 직접 쓰지 않는다. 모든 mutation은 Action을 통해서만 실행되며, Worker가 검증 및 감사 로그를 기록한다.
| 개념 | 역할 | SideSeat 예시 |
|---|---|---|
| Object Type | 타입 스키마 정의 | Meetup, Space, User, RSVP |
| Link Type | 방향성 있는 관계 정의 | Meetup → atPlace → Space |
| Action | 거버넌스 적용 mutation | CreateMeetup (host role 필요, 감사됨) |
| Function | 읽기 전용 쿼리 / 집계 | getMeetupsBySpace, getRSVPCount |
| Policy | mutation 전 RLS 적용 | host만 자신의 Meetup 수정 가능 |
에이전트 Role 설계
각 에이전트는 Role을 가지며, Role이 허용하는 toolIds만 호출할 수 있다. DB 직접 접근은 어떤 Role도 불가능하다.
레포지토리 구조
이론 → 구현 매핑
| 이론 개념 | agent-control-plane 구현체 | 파일 |
|---|---|---|
| Ontology Layer | Object/Link/Action/Policy 스키마 | docs/SideSeat-Ontology-Agents.md |
| Orchestrator | CLI Runner + resolveRoleConfig | src/index.ts, src/resolve-agent.ts |
| Sub-Agent | Think → Act → Observe 루프 | src/runner.ts |
| Skill Agent | Tool Registry (Zod 검증 포함) | src/registry.ts |
| Security & Governance | Guardrails + Role allowlist | src/guardrails.ts, src/roles.ts |
| Workflow Services | Pipeline Engine (DAG, Drawflow) | src/pipeline-engine.ts |
| AI Products Layer | Agent Platform UI (React + Vite) | platform-web/, backend/ |
Palantir AIP 공식 아키텍처 다이어그램을 보면 이 글에서 정리한 개념들이 어떻게 실제 엔터프라이즈 플랫폼에서 구현되는지 확인할 수 있다. 12개 컴포넌트가 번호로 매핑되며, 전부 Ontology를 중심으로 연결된다.
Ontology Core — 3개 엔진
Object · Link · Action
인간+AI 공통 언어
수십만 Action 오케스트레이션
수십억 Object 쿼리
지속적 Ontology 갱신
Human+AI Decision Model
12개 컴포넌트 전체 구조
다이어그램에서 읽어야 할 핵심 포인트
AIP 공식 컴포넌트 × agent-control-plane 구현 대응
| # AIP | AIP 컴포넌트 | 레포 구현 | 파일 |
|---|---|---|---|
| ① | Secure LLM Integration | Ollama(로컬) / Anthropic(클라우드) 선택 | src/runner.ts, .env |
| ② | End-to-end Observability | 파이프라인 run 히스토리 (경량 구현) | src/run-history.ts |
| ③ | Context Engineering | 툴 정의 + Zod 스키마 + 역할별 툴셋 | src/registry.ts |
| ④⑤ | Ontology System ★ | Object/Link/Action/Policy 스키마 | docs/SideSeat-Ontology-Agents.md |
| ⑥ | Security & Governance | allowlist 강제 + audit log + role 정책 | src/guardrails.ts, src/roles.ts |
| ⑦ | Agent Lifecycle | Think→Act→Observe 루프 + Platform Studio UI | src/runner.ts, platform-web/ |
| ⑧ | Operational Automation | DAG 파이프라인 실행 (Drawflow 기반) | src/pipeline-engine.ts |
| ⑨ | Development Environments | Agent Platform UI + Docker 컨테이너 | backend/, Dockerfile, docker-compose.yml |
| ⑩⑪⑫ | Human+AI Apps / Package / Enterprise Automation | 미구현 (SideSeat product repo 영역) | — (별도 repo) |
결론
좋은 LLM 시스템은 "프롬프트를 잘 쓰는 시스템"이 아니라,
Ontology로 세계를 정의하고, 문제를 올바르게 분해하고,
필요한 도구를 적절히 호출하고, 결과를 검증해서 다시 조립하는 시스템이다.
Singleton · Contextual · Ontology · Sub-Agent · Skill Agent · Orchestrator · Palantir AIP
Palantir
As described in the overview of AIP, Foundry, and Apollo, AIP is Palantir’s platform for connecting generative AI into operational domains. While...
www.palantir.com
AIP architecture
As described in the overview of AIP, Foundry, and Apollo, AIP is Palantir’s platform for connecting generative AI into operational domains. While AIP and Foundry operate together as part of a shared service mesh, powered by Apollo and deployed within Rubix, this page provides a view of AIP's end-to-end architecture through an AI-centric lens. This includes capabilities for securely connecting to the full range of LLMs, continuously integrating context into the Ontology, building agents and automations, observing and evaluating the ongoing performance of deployed agents, and a full developer toolchain for managing AI-driven products.
The AIP architecture can be summarized into 12 general categories of capability:

- Secure LLM integration & access: Enabling secure access to the full range of commercial LLMs (e.g., GPT, Gemini, Claude, Grok models) and open-source models (e.g., Llama), through Palantir-managed infrastructure that ensures that no transmitted data is retained by third-party providers, and no transmitted data is used for retraining by model providers. Enterprises can also integrate their existing models, whether existing model subscriptions, fine-tuned models, or domain-specific models.
- End-to-end observability: Providing monitoring tools for every step of AI-driven workflows and agentic processes. This includes fine-grained monitoring for all data flows that feed the Ontology, logging for every action taken by human users or AI agents, and the ability to trace the cascade of chained executions in a workflow. This observability extends to token consumption and other aspects of resource usage.
- Context engineering: Equipping developers with no-, low-, and pro-code tools for integrating the contextual data, logic, action that power the Ontology and all dependent workflows. All modalities of data integration (e.g., batch, streaming, real-time replication via CDC) can be leveraged through any runtime (e.g., Spark, Flink, DataFusion, Polars), while adhering to cohesive security, governance, provenance-tracking, and other essential guarantees.
- The Ontology system: Activating context by integrating disparate data, logic, action, and security into a unified representation of enterprise decision-making. Read more about the Ontology.
- The Ontology’s language models the "nouns" and "verbs" of operational processes into a legible form for both humans and agents.
- The Ontology’s engine enables querying billions of objects, orchestrating tens-of-thousands of actions, and continuously incorporating feedback-based learning.
- The Ontology’s toolchain empowers developers to build diverse and complex AI-powered applications, atop a common foundation.
- Vector, compute, tool services: Providing the integrated vectorization services needed to produce and manage embeddings; an extensible compute framework that can leverage multi-node engines (e.g., Spark, Flink), efficient single-node engines (e.g., DuckDB, Polars), and any containerized “BYO” engine; and an integrated set of tool services that work with the Ontology system to function as an ever-evolving tool factory. The platform is designed to be modular and extensible with respect to models, compute engines, and interfaces.
- Security & governance: Ensuring that every operation made by humans and agents abides by rigorous role-, marking-, and purpose-based controls. This requires a combination of infrastructure, platform, and enterprise security controls. These controls can be granularly configured and dynamically interrogated, and are cataloged in expressive audit logging. Governance capabilities extend uniformly across all operational, engineering, and developer activities performed within the platform interfaces as well as programmatically through the APIs/SDKs.
- Agent lifecycle: Powering the interconnected building, orchestration, and evaluation processes for agents in production. Agents can be constructed using no-, low-, and pro-code workbenches. Durable orchestrations can be configured and managed through low-code interfaces like AIP Logic, or pro-code interfaces like Code Workspaces. The integrated evaluation framework (AIP Evals) operates seamlessly with the Ontology, enabling you to create test cases, debug and iterate on agent definitions, compare performance across different LLMs, examine the variance across executions, and more.
- Operational automation: Facilitating the different modes of automation required within and across workflows. This includes scalable schedule-based automations, near real-time event-driven automations that process streaming data, and automations which are enmeshed with API-driven operations. Regardless of the modality, every automation can leverage the rich set of data, logic, and action primitives in the Ontology system, and a wide array of execution and notification configurations.
- Development environments: Empowering developers to build agents and automations, how and where they want to. AIP provides integrated development environments (e.g., VS Code, JupyterLab), which provide seamless connectivity with Ontology-driven applications and integrated testing and evaluation frameworks. In equal measure, the Platform SDK and Ontology SDK, in conjunction with Palantir’s VS Code plug-in, bring the same core functionality to existing environments and developer toolchains. Additionally, Palantir MCP provides a secure interface for agentic development (analogous to what is possible in the platform with AI FDE).
- Human + AI applications: Providing the full spectrum of AI-driven experiences; from object-oriented analytics, to real-time application building, to multimodal governance workflows, to the administration of core platform capabilities. Operational users, compliance teams, engineers, analysts, and other key personas have out-of-the-box applications specifically tailored for their workflows, as well as the ability to rapidly construct new Ontology-powered applications. In each case, the infusion of AI can be carefully controlled and transparently assessed, ensuring a smooth journey from augmentation to automation.
- Package, release, deploy: Allowing developers to move beyond point analytics and applications to build fully featured AI products which leverage an integrated DevOps toolchain. End-to-end collections of data pipelines, Ontology definitions, automations, and prebuilt applications can be packaged, released, and deployed across heterogeneous target environments. Developers can specify allowances for "last-mile" customization, and downstream teams can securely receive updates as product definitions evolve, and as changes are validated and promoted across release channels.
- Enterprise automation: Enabling builders, of all personas and backgrounds, to wield specialized AI agents (e.g., AI FDE, AIP Analyst) to construct data pipelines, write business logic, train models, build ontologies, produce analytics, and develop end-to-end applications. Critically, these agents operate atop the same foundation as human users, meaning that they abide by the same integrated change management capabilities (e.g., Global Branching), and can seamlessly weave human-in-the-loop workflows with entirely autonomous operations.
'開發' 카테고리의 다른 글
| Alibaba: Qwen3.6-Plus to Advance the Agentic AI (1) | 2026.04.04 |
|---|---|
| Anthropic: "LLM에 왜 감정 표현이 생기는가" (1) | 2026.04.03 |
| Hibiki: GPT-2 124M 처음부터 빌드·학습하는 웹 가이드 (0) | 2026.03.19 |
| Anthropic: Claude cowork는 어디까지 연동되는가 (w/ Microsoft 365, Cursor, Chrome, Github e (0) | 2026.03.15 |
| Google: Distillation, Experimentation, and (Continued) Integration of AI for Adv (0) | 2026.02.13 |