<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://thakicloud.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://thakicloud.github.io/" rel="alternate" type="text/html" /><updated>2026-07-08T15:26:58+09:00</updated><id>https://thakicloud.github.io/feed.xml</id><title type="html">Thaki Cloud Tech Blog | ThakiCloud | 다키클라우드 기술 블로그</title><subtitle>Thaki Cloud (ThakiCloud, 다키클라우드, thaki cloud, THAKI CLOUD, ثاكي كلاود)는 AI/ML Engineering, LLMOps, DevOps 분야의 최신 기술과 실무 경험을 공유하는 전문 기술 블로그입니다. 머신러닝 모델 운영, 쿠버네티스, 클라우드 인프라, AI 엔지니어링 커리어, 인공지능 기술 블로그, 다키클라우드 개발 팀의 깊이 있는 인사이트를 제공합니다. مدونة تقنية متخصصة في هندسة الذكاء الاصطناعي والحوسبة السحابية.</subtitle><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><entry xml:lang="en"><title type="html">The Fab Finally Made Money. For Whom, Exactly?</title><link href="https://thakicloud.github.io/en/comics/samsung-foundry-first-profit-own-the-fab/" rel="alternate" type="text/html" title="The Fab Finally Made Money. For Whom, Exactly?" /><published>2026-07-08T00:00:00+09:00</published><updated>2026-07-08T00:00:00+09:00</updated><id>https://thakicloud.github.io/en/comics/samsung-foundry-first-profit-own-the-fab</id><content type="html" xml:base="https://thakicloud.github.io/en/comics/samsung-foundry-first-profit-own-the-fab/"><![CDATA[<p>Samsung’s foundry business posted its first monthly profit in June, the first time it has been in the black in years. A foundry makes chips other people designed, and this one bled money for a long stretch before the numbers finally turned. The strip runs that moment through the ThakiCloud lens: own the fab, and the upside stays yours. Paxis and Metis push the logic until Hyper, invoice in hand, starts to sweat.</p>

<p><img src="/assets/images/posts/comics/samsung-foundry-first-profit-own-the-fab/strip.png" alt="The Fab Finally Made Money. For Whom, Exactly?" /></p>

<blockquote>
  <p>Source: <a href="https://x.com/hjguyhan/status/2074073652283519076">RT @jukan05: According to Korean media reports, Samsung Foundry turned profitable on a monthly basis in June. This marks</a> · twitter</p>
</blockquote>

<h2 id="what-this-means-for-thakicloud">What this means for ThakiCloud</h2>

<p>The lesson from a foundry turning profitable is blunt: rent your means of production, and the profit prints on someone else’s ledger. AI infrastructure works the same way. Rent GPUs from a public cloud and the better your models get, the fatter the bill. ThakiCloud is built the other way. Metis runs training and inference inside your own facility, and Paxis operates the agents on top of it. On-prem costs more up front, but like a fab, it crosses a line where the upside starts flowing back to you. The automation behind this very blog runs on that same footing.</p>

<hr />

<p><em>An auto-generated comic riffing on this week’s industry news.</em></p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="comics" /><category term="Samsung Foundry" /><category term="반도체 자립" /><category term="온프렘" /><category term="주권 AI" /><category term="Metis" /><category term="Paxis" /><summary type="html"><![CDATA[Years of making other people's chips, finally in the black. Rented upside prints on someone else's ledger.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://thakicloud.github.io/assets/images/posts/comics/samsung-foundry-first-profit-own-the-fab/strip.png" /><media:content medium="image" url="https://thakicloud.github.io/assets/images/posts/comics/samsung-foundry-first-profit-own-the-fab/strip.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry xml:lang="ko"><title type="html">GPU TEE와 모델 서명을 하나로 묶기: 주권형 멀티테넌트 AI를 위한 증명된 기밀 추론</title><link href="https://thakicloud.github.io/ko/research/attested-confidential-sovereign-inference/" rel="alternate" type="text/html" title="GPU TEE와 모델 서명을 하나로 묶기: 주권형 멀티테넌트 AI를 위한 증명된 기밀 추론" /><published>2026-07-08T00:00:00+09:00</published><updated>2026-07-08T00:00:00+09:00</updated><id>https://thakicloud.github.io/ko/research/attested-confidential-sovereign-inference</id><content type="html" xml:base="https://thakicloud.github.io/ko/research/attested-confidential-sovereign-inference/"><![CDATA[<h2 id="이-글을-누가-읽으면-좋은가">이 글을 누가 읽으면 좋은가</h2>

<p>이 글은 온프렘 또는 에어갭 환경에서 LLM 추론 서비스를 운영하거나, 병원·은행·정부기관처럼 데이터를 외부로 내보낼 수 없는 규제 산업 고객을 위한 AI 플랫폼을 설계하는 엔지니어를 위해 씁니다. GPU 기밀 컴퓨팅(confidential computing)과 원격 증명(remote attestation)이 무엇을 보장하고 무엇을 보장하지 않는지, 그리고 그 보장을 “어떤 모델 가중치가 실제로 서빙되었는가”라는 질문과 어떻게 연결해야 규제기관이 납득할 증거가 되는지를 다룹니다. Kubernetes와 Kueue 위에서 멀티테넌트 GPU 클러스터를 운영하는 조직이라면 특히 관련이 깊습니다.</p>

<h2 id="문제의식-우리를-믿어달라는-규제기관에게-통하지-않는다">문제의식: “우리를 믿어달라”는 규제기관에게 통하지 않는다</h2>

<p>병원이나 정부기관, 은행이 자체 서버에 LLM을 올리려는 이유는 단순합니다. 데이터를 외부로 내보내지 않기 위해서입니다. 그런데 온프렘 배포의 진짜 목적은 제3자를 배제하는 데서 그치지 않습니다. 갈수록 요구되는 것은 플랫폼을 운영하는 회사 자신조차 테넌트의 데이터를 들여다보지 못하고, 몰래 모델을 바꿔치기하지 못한다는 보장입니다. 문제는 플랫폼 운영자가 클러스터의 root 권한을 쥐고 스케줄러를 통제하며 모델 이미지를 직접 배포한다는 사실입니다. 규제받는 워크로드 앞에서 “저희를 믿어주세요”는 컴플라이언스 근거가 될 수 없습니다. 규제기관이 원하는 것은 약속이 아니라 증명입니다.</p>

<p>구체적으로 주권형 플랫폼은 어떤 추론 요청에 대해서든 사후에, 그리고 운영자를 신뢰하지 않는 제3자에게 두 가지를 증명할 수 있어야 합니다. 첫째는 데이터 기밀성 주장으로, 테넌트의 입력값과 모델 활성화값, 출력값이 GPU 기밀 컴퓨팅 엔클레이브 밖으로 평문 상태로 나간 적이 없다는 것입니다. 호기심 많은 운영자든 같은 클러스터를 쓰는 다른 테넌트든 네트워크 공격자든 이 값을 들여다볼 수 없어야 합니다. 둘째는 모델 프로버넌스 주장으로, 출력을 만들어낸 가중치가 조직의 감사·릴리스 게이트를 통과한 바로 그 아티팩트였다는 것이며, 백도어가 심어졌거나 몰래 파인튜닝되었거나 다른 버전으로 치환된 것이 아니라는 뜻입니다.</p>

<p>이 두 문제는 각각 튼튼한 선행 연구를 갖고 있지만 서로 따로 발전해 왔습니다. NVIDIA Hopper와 Blackwell 세대의 GPU TEE는 하드웨어 신뢰 루트와 원격 증명을 제공해 첫 번째 주장을 뒷받침할 수 있고, 모델 프로버넌스와 공급망 증명에 관한 연구는 학습·릴리스 주장을 모델 아티팩트에 묶어 두 번째 주장을 뒷받침할 수 있습니다. 상용 TEE 위에서 기밀 LLM 서빙을 구현한 시스템도 이미 존재합니다. 그러나 우리가 아는 한 어떤 시스템도 증명 근거 체인을 서명된 모델 프로버넌스 레코드에 암호학적으로 묶어 멀티테넌트 GPU 스케줄러 내부에서 강제하지는 않습니다. 원격 증명은 계산이 어디서 일어났는지를 말해주고, 프로버넌스는 어떤 코드와 가중치가 릴리스되었는지를 말해주지만, 어느 쪽도 “이 요청에 대해 감사받은 그 가중치가 증명된 그 엔클레이브 안에서 돌았다”는 것을 규제기관에게 말해주지 못합니다. 바로 이 이음매가 비어 있습니다.</p>

<h2 id="핵심-기여-증명과-프로버넌스를-요청-단위로-묶는-aci-프로토콜">핵심 기여: 증명과 프로버넌스를 요청 단위로 묶는 ACI 프로토콜</h2>

<p>ThakiCloud AI Research가 제안하는 <strong>ACI(Attested Confidential Inference)</strong>는 RATS 스타일의 원격 증명 근거를 서명된 모델 프로버넌스 레코드에 묶고, 그 결합을 Kubernetes job admission 경계에서 강제하는 프로토콜입니다. 핵심 아이디어를 다섯 개의 논리적 컴포넌트로 나누어 보면, 먼저 릴리스 시점에 감사받은 가중치의 다이제스트와 학습 계보, 빌드 환경, 스캔 결과 같은 릴리스 주장을 서명해 프로버넌스 레코드 $P$를 만드는 <strong>프로버넌스 등록기(Provenance Registrar)</strong>가 있습니다. 다음으로 매 요청마다 신선한 nonce를 발급하고 GPU/CPU TEE로부터 증거를 받아 검증한 뒤 엔클레이브 측정값을 담은 증명 결과 $A$를 만드는 RATS Verifier 역할의 <strong>증명 브로커(Attestation Broker)</strong>가 있습니다.</p>

<p>이 둘이 만나는 지점이 논문의 핵심 객체인 <strong>바인딩 원장(Binding Ledger)</strong>입니다. $A$의 해시와 $P$의 해시, 테넌트 식별자, 요청 ID를 함께 서명해 결합 레코드 $B$를 만들고 append-only 원장에 기록합니다. 이 결합이 곧 “증명된 그 엔클레이브 안에서 감사받은 그 가중치가 서빙되었다”는 단일 서명 증거입니다. 이 검증은 <strong>Kueue admission 게이트</strong>에서 GPU job을 실제로 스케줄링하기 전에 강제되어, 유효한 결합이 없으면 테넌트 신원과 매칭되는 GPU job이 admit되지 않습니다. 마지막으로 규제기관이 요청 ID만으로 ${A, P, B}$ 전체를 조회하고 서명과 엔클레이브 측정값을 운영자와 독립적으로 재검증할 수 있는 읽기 전용 <strong>규제기관 검증 API</strong>가 놓입니다.</p>

<p><img src="/assets/images/posts/research/attested-confidential-sovereign-inference/aci-protocol-flow.png" alt="ACI 프로토콜 시퀀스 흐름" />
<em>ACI의 요청 단위 결합 과정을 개념적으로 나타낸 그림입니다. 증명 결과 $A$와 프로버넌스가 검증된 가중치 다이제스트 $P$가 Kueue admission 게이트에서 만나 서명된 결합 $B$를 만듭니다. 실측 하드웨어가 아닌 프로토콜 설계를 시각화한 예시입니다.</em></p>

<p>여기서 짚어야 할 정직한 지점이 있습니다. 실행 중인 다이제스트를 서명된 참조값과 비교하는 것 자체는 새로운 암호학적 기법이 아닙니다. measured boot나 DICE, TPM quote-vs-golden-value 같은 이미 확립된 measured-launch 패턴과 같은 종류이고, 서명된 릴리스 주장을 아티팩트에 묶는 일도 선행 연구가 이미 하고 있습니다. 이 논문이 정직하게 방어할 수 있는 기여는 새로운 암호 기법이 아니라 <strong>합성(composition)</strong>입니다. GPU TEE 원격 증명을 서명된 모델 프로버넌스 검증과 결합해, 멀티테넌트 Kubernetes+Kueue 시스템 안에서 스케줄러 admission 시점에 강제되는 요청 단위·규제기관 검증 가능 게이트로 만든 것은 우리가 아는 한 이 작업이 처음입니다.</p>

<p>논문은 취약점 하나를 숨기지 않고 정면으로 다룹니다. 증거가 생성되는 시점(3단계)과 가중치가 로드되어 실제로 요청이 서빙되는 시점(4~6단계) 사이에는 없앨 수 없는 TOCTOU(time-of-check-to-time-of-use) 간극이 존재합니다. 논문은 로드와 다이제스트 검사를 증명 이후로 순서화하고 둘을 하나의 결합 $B$에 함께 묶어 이 창을 좁히지만 완전히 없애지는 못한다고 명시합니다. 이 게이트가 root 권한을 쥔 운영자 자체를 막을 수는 없다는 점도 정직하게 인정합니다. 운영자가 게이트를 우회해 그림자 요청을 처리하면 유효한 결합 $B$가 생성되지 않고, 그 결과 원장에 기록이 남지 않는다는 사실 자체가 규제기관이 이후 청구 로그나 API 게이트웨이 요청 수와 원장을 대조해 발견할 수 있는 증거가 됩니다. 즉 이 게이트는 악의적 운영자를 사전에 막는 예방(prevention)이 아니라, 우회 시 검증 가능한 공백을 남기는 탐지(detection) 메커니즘으로 설계되었습니다.</p>

<h2 id="오버헤드는-얼마나-되나-실제-h200-클러스터에서-측정한-소프트웨어-비용">오버헤드는 얼마나 되나: 실제 H200 클러스터에서 측정한 소프트웨어 비용</h2>

<p>이 논문에서 가장 정직했던 지점은 원래 성능 주장이었습니다. 저자들은 GPU TEE(CC 모드)가 켜진 하드웨어에 접근할 수 없었기 때문에 전체 지연 시간을 $L_{\text{ACI}} = L_{\text{base}} + L_{\text{TEE}} + L_{\text{att}}/N + L_{\text{ledger}}$라는 가산 모델로 분해하고, 각 항목의 값을 오직 인용된 선행 연구 범위로만 채웠습니다. 이후 ThakiCloud의 실제 데모 클러스터 tkai-prod-compute-h200에서 이 모델을 다시 들여다봤습니다. 이 클러스터는 NVIDIA H200-NVL 4장(Hopper, 드라이버 580.65.06, CUDA 13.0)과 AMD EPYC 9335 32코어 CPU를 갖추고 있지만, <code class="language-plaintext highlighter-rouge">nvidia-smi conf-compute -f</code>로 확인한 CC 상태는 OFF이고 SEV나 TDX 기반 기밀 VM도 구성돼 있지 않습니다. 즉 $L_{\text{TEE}}$, 다시 말해 GPU 기밀 컴퓨팅 자체의 처리량 페널티는 이 클러스터에서 여전히 측정할 수 없습니다. 하지만 ACI가 새로 추가하는 소프트웨어 경로, 즉 서명 원장 append와 프로버넌스 검증과 attestation 흐름은 CC 모드 여부와 무관하게 실제 vLLM 서빙 파이프라인 위에서 측정할 수 있었습니다.</p>

<p>베이스라인부터 실측했습니다. 같은 H200 클러스터에서 vLLM으로 Qwen3.6-35B-A3B를 서빙했을 때 요청당 종단 지연 시간($L_{\text{base}}$)은 평균 4286ms, 처리량은 평균 초당 29.9토큰이었습니다.</p>

<p><img src="/assets/images/posts/research/attested-confidential-sovereign-inference/fig-measured-overhead.png" alt="Measured ACI software overhead" />
<em>H200 vLLM 베이스라인(약 4286ms/요청) 대비 ACI 소프트웨어 바인딩 경로가 추가하는 오버헤드를 실측한 결과입니다. 서명 원장 append, 프로버넌스 검증, 소프트웨어 attestation 흐름을 모두 더해도 요청당 약 0.01ms로, 베이스라인의 0.0002% 수준입니다.</em></p>

<p>이 베이스라인 위에 ACI가 얹는 항목들을 각각 측정했습니다. 서명 원장에 결합 레코드 $B$를 append하는 비용($L_{\text{ledger}}$)은 3000회 반복 측정에서 평균 0.0037ms였고, 이 가운데 서명 자체에 드는 비용은 0.0014ms였습니다. 프로버넌스 쪽은 두 단계로 나뉩니다. 512MB 샤드 전체의 SHA-256 다이제스트를 계산하는 작업은 2.15GB/s의 처리량이 나왔는데, 이는 모델이 로드될 때 한 번만 수행하고 모델 수명 전체에 걸쳐 상각되는 비용입니다. 반면 요청마다 실제로 검증하는 비용은 2만 회 측정에서 평균 0.00014ms에 불과했습니다. 마지막으로 소프트웨어 attestation 핸드셰이크 흐름 전체는 요청당 평균 0.0062ms였지만, 같은 증명 세션으로 128개 요청을 처리하도록 상각하면 요청당 약 0.00005ms까지 떨어졌습니다.</p>

<p><img src="/assets/images/posts/research/attested-confidential-sovereign-inference/fig-att-amortization.png" alt="Attestation amortization" />
<em>증명 세션을 상각하는 요청 수 $N$이 늘어날수록 요청당 attestation 비용이 어떻게 줄어드는지 보여줍니다. $N$=1일 때 0.0062ms였던 비용이 $N$=128에서는 0.00005ms로, $N$=512에서는 0.000012ms까지 떨어집니다.</em></p>

<p>이 항목들을 합치면 결론은 명확합니다. ACI의 소프트웨어 바인딩 경로 전체, 즉 서명 원장 append와 요청당 프로버넌스 검증과 소프트웨어 attestation 흐름을 모두 더해도 요청당 약 0.01ms가 추가될 뿐이며, 이는 4286ms 베이스라인의 0.0002% 수준으로 0.001%에도 미치지 못합니다. 실무적으로는 사실상 무시해도 되는 비용입니다.</p>

<p><img src="/assets/images/posts/research/attested-confidential-sovereign-inference/fig-cost-split.png" alt="Cost split" />
<em>요청당 약 0.01ms인 ACI 소프트웨어 오버헤드가 원장 append, 프로버넌스 검증, attestation 흐름 세 항목으로 어떻게 나뉘는지를 보여줍니다. 512MB 샤드 다이제스트 계산은 모델 수명에 걸쳐 상각되는 일회성 비용이라 이 분해에서는 제외했습니다.</em></p>

<p>물론 이 측정이 전체 그림을 다 채우지는 못합니다. GPU 기밀 컴퓨팅 자체의 처리량 페널티($L_{\text{TEE}}$)는 이 클러스터에서 CC 모드가 꺼져 있어 여전히 측정하지 못했고, 선행 연구가 보고한 4~8% 범위(chrapek2025confidential, zhu2024hopperbenchmark)를 인용값으로만 남겨둡니다. 하드웨어 증명 근거 생성 자체도 CC 모드 Hopper/Blackwell 환경이 있어야 측정할 수 있어 아직 실측하지 못했습니다. 다시 말해 이번 실측으로 좁혀진 것은 ACI가 새로 추가하는 소프트웨어 비용이고, 남은 미지수는 GPU TEE 하드웨어 자체의 비용 하나로 줄었습니다.</p>

<p>논문은 다섯 가지 요구사항(증명 신선도, 프로버넌스 결합, 부인 방지, 스케줄러 수준 격리, 수용 가능한 오버헤드)에 대해 세 종류의 공격자(호기심 많은 운영자, 악의적 공동 테넌트, 네트워크 공격자)를 각각 대입해 논증합니다.</p>

<p><img src="/assets/images/posts/research/attested-confidential-sovereign-inference/req-adversary-matrix.png" alt="보안 요구사항 대 공격자 매트릭스" />
<em>다섯 가지 ACI 요구사항이 각각 어떤 공격자 유형에 대응하는지 정리한 매트릭스입니다. 스케줄러 격리 요구사항(R4)은 공동 테넌트와 운영자 두 유형 모두를 커버합니다. 실측이 아닌 위협 모델 분석 결과입니다.</em></p>

<h2 id="회사사회과학에-대한-기여">회사·사회·과학에 대한 기여</h2>

<p>ThakiCloud 입장에서 이 연구의 의미는 분명합니다. 지금 운영 중인 Keycloak 기반 테넌트 신원, Kueue GPU admission, ArgoCD GitOps 릴리스는 이미 격리 메커니즘으로 작동하고 있습니다. ACI는 이 기존 자산에 새로운 격리 장치를 더하는 대신 암호학적 결합 하나만 얹어, 지금 갖고 있는 멀티테넌트 격리를 규제기관이 검증 가능한 증거로 바꿉니다. 이는 2026년 하반기 릴리스가 겨냥하는 보안·셀프호스팅 방향, 그리고 국내 공공·금융 부문에서 요구되는 망분리·감사 가능성 요건과 정확히 맞닿아 있습니다.</p>

<p>사회적으로 보면 이 결합의 가치는 신뢰 장벽을 낮추는 데 있습니다. 병원이나 정부기관, 금융권처럼 프라이버시가 절대적인 조직이 “플랫폼 운영자를 신뢰해야만” LLM을 쓸 수 있다면 채택은 늦어질 수밖에 없습니다. 증명이 운영자의 정직함에 의존하지 않고 성립한다는 사실은 그 장벽을 실질적으로 낮춥니다.</p>

<p>과학적으로는 이 논문이 새로운 암호 기법을 주장하지 않는다는 점이 오히려 정직한 기여의 근거입니다. GPU TEE 원격 증명과 서명된 모델 프로버넌스 검증을 멀티테넌트 스케줄러 admission 시점에 요청 단위로 강제하는 조합은, 우리가 아는 한 선행 연구가 다루지 않은 자리입니다. 기존 연구들은 증명과 프로버넌스를 각각 따로 발전시켰고, Kubernetes 거버넌스 연구들도 하드웨어 증명에 뿌리를 두지 않은 채 오케스트레이션·텔레메트리 계층에서만 동작했습니다. ACI는 그 사이의 이음매를 처음으로 명시적으로 짚어 보여줍니다.</p>

<h2 id="한계-이-논문이-스스로-인정하는-것들">한계: 이 논문이 스스로 인정하는 것들</h2>

<p>이 논문은 어디까지 측정했고 어디부터는 여전히 인용인지를 감추지 않습니다. ACI가 새로 추가하는 소프트웨어 바인딩 경로, 즉 서명 원장 append와 요청당 프로버넌스 검증과 소프트웨어 attestation 흐름은 실제 H200 클러스터(tkai-prod-compute-h200)에서 측정했고, 요청당 약 0.01ms로 베이스라인 대비 무시할 수준임을 확인했습니다. 다만 이 클러스터는 CC 모드가 꺼져 있어 GPU 기밀 컴퓨팅 자체의 처리량 페널티($L_{\text{TEE}}$)와 하드웨어 증명 근거 생성만큼은 여전히 측정하지 못했습니다. Hopper/Blackwell CC 모드 위에서 이 두 항목을 직접 측정하는 일이 이후 과제로 남아 있으며, 이는 지금 가진 클러스터에서 CC 모드를 켤 수 없기 때문이라고 명시합니다.</p>

<p>그 외에도 논문은 몇 가지 미해결 지점을 스스로 짚습니다. 여러 클러스터에 걸친 배포(MultiKueue)에서 단일 클러스터의 바인딩 원장만으로는 일관된 크로스 클러스터 감사 뷰를 만들 수 없다는 점, 증명 핸드셰이크를 여러 요청에 걸쳐 상각하는 정책이 엔클레이브를 세션 중간에 폐기해야 하는 상황(취약점 공개 등)과 상충한다는 점, 그리고 RAG 배포에서는 기밀성 주장이 모델 가중치뿐 아니라 검색 시점의 컨텍스트로도 확장되어야 한다는 점입니다. 또한 ACI는 서빙된 가중치가 서명된 프로버넌스 레코드와 일치함을 증명할 뿐, 그 프로버넌스 레코드 자체가 신뢰할 만한 모델을 기술하는지, 또는 릴리스 서명 키의 보관이 안전한지는 별개의 공급망 문제로 남겨둡니다.</p>

<p>논문에 관한 더 자세한 내용은 <a href="https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-08-attested-confidential-sovereign-inference">HuggingFace 데이터셋 페이지</a>에서 확인하실 수 있습니다.</p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="research" /><category term="research" /><category term="confidential-computing" /><category term="gpu-tee" /><category term="remote-attestation" /><category term="model-provenance" /><category term="multi-tenant-isolation" /><category term="sovereign-ai" /><category term="kubernetes-inference" /><summary type="html"><![CDATA[온프렘 AI 플랫폼을 쓰는 병원이나 은행, 정부기관은 데이터가 엔클레이브 밖으로 새지 않았다는 것과 서빙된 모델 가중치가 감사받은 그 파일이 맞다는 것, 이 두 가지를 규제기관에게 증명해야 합니다. GPU 기밀 컴퓨팅의 원격 증명과 모델 프로버넌스는 지금까지 따로 발전해 온 두 기술입니다. ThakiCloud AI Research가 이 둘을 요청 단위로 암호학적으로 묶어 Kubernetes 스케줄러 admission 단계에서 강제하는 프로토콜 ACI(Attested Confidential Inference)를 제안합니다.]]></summary></entry><entry xml:lang="ko"><title type="html">파운드리 첫 흑자, 근데 그 흑자 누구 거임ㅋ</title><link href="https://thakicloud.github.io/ko/%EB%A7%8C%ED%99%94/samsung-foundry-first-profit-own-the-fab/" rel="alternate" type="text/html" title="파운드리 첫 흑자, 근데 그 흑자 누구 거임ㅋ" /><published>2026-07-08T00:00:00+09:00</published><updated>2026-07-08T00:00:00+09:00</updated><id>https://thakicloud.github.io/ko/%EB%A7%8C%ED%99%94/samsung-foundry-first-profit-own-the-fab</id><content type="html" xml:base="https://thakicloud.github.io/ko/%EB%A7%8C%ED%99%94/samsung-foundry-first-profit-own-the-fab/"><![CDATA[<p>삼성 파운드리가 6월에 처음으로 월 단위 흑자를 냈다는 소식입니다. 파운드리는 남이 설계한 칩을 대신 찍어주는 위탁생산 사업인데, 긴 적자 구간을 지나 몇 년 만에 처음으로 돈이 남았습니다. 만화는 이 장면을 ‘남한테 안 빌리고 내 공장에서 찍으니 결국 이문이 내 것’이라는 타키클라우드 세계관으로 비틀었습니다. 파시스와 메티스가 그 논리를 밀어붙이자, 요금 청구서를 든 하이퍼가 슬슬 식은땀을 흘립니다.</p>

<p><img src="/assets/images/posts/만화/samsung-foundry-first-profit-own-the-fab/strip.png" alt="파운드리 첫 흑자, 근데 그 흑자 누구 거임ㅋ" /></p>

<blockquote>
  <p>원 뉴스: <a href="https://x.com/hjguyhan/status/2074073652283519076">RT @jukan05: According to Korean media reports, Samsung Foundry turned profitable on a monthly basis in June. This marks</a> · twitter</p>
</blockquote>

<h2 id="thakicloud-제품-적용-시사점">ThakiCloud 제품 적용 시사점</h2>

<p>파운드리 흑자가 주는 교훈은 단순합니다. 생산 수단을 남에게 빌리면 이문도 남의 장부에 찍힙니다. AI 인프라도 다르지 않습니다. 퍼블릭 클라우드에서 GPU를 빌려 모델을 돌리면, 성능이 좋아질수록 청구서만 두툼해집니다. 타키클라우드는 반대로 설계했습니다. 메티스가 학습과 추론을 자기 시설 안에서 돌리고, 파시스가 그 위의 에이전트를 직접 운영합니다. 온프렘은 초기 투자가 들지만, 파운드리처럼 어느 지점을 넘어서면 이문이 내 쪽으로 넘어옵니다. 이 블로그를 굴리는 자동화도 바로 그렇게 우리 손 안에서 돌아갑니다.</p>

<hr />

<p><em>이 만화는 업계 뉴스를 바탕으로 자동 생성된 초안입니다.</em></p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="만화" /><category term="Samsung Foundry" /><category term="반도체 자립" /><category term="온프렘" /><category term="주권 AI" /><category term="Metis" /><category term="Paxis" /><summary type="html"><![CDATA[남 칩 찍어주다 몇 년 만에 흑자. 빌린 흑자는 남의 통장에 찍힌다.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://thakicloud.github.io/assets/images/posts/%EB%A7%8C%ED%99%94/samsung-foundry-first-profit-own-the-fab/strip.png" /><media:content medium="image" url="https://thakicloud.github.io/assets/images/posts/%EB%A7%8C%ED%99%94/samsung-foundry-first-profit-own-the-fab/strip.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry xml:lang="ar"><title type="html">أمر /cd في Claude Code: كيف تنتقل بين المجلدات دون إعادة تشغيل الجلسة وتحافظ على ذاكرة التخزين المؤقت للـ prompt</title><link href="https://thakicloud.github.io/ar/dev/claude-code-cd-prompt-cache/" rel="alternate" type="text/html" title="أمر /cd في Claude Code: كيف تنتقل بين المجلدات دون إعادة تشغيل الجلسة وتحافظ على ذاكرة التخزين المؤقت للـ prompt" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/ar/dev/claude-code-cd-prompt-cache</id><content type="html" xml:base="https://thakicloud.github.io/ar/dev/claude-code-cd-prompt-cache/"><![CDATA[<p>عندما تعمل لفترة طويلة مع وكيل برمجة (coding agent)، تأتي حتماً لحظة تحتاج فيها إلى الانتقال بين المجلدات. المثال النموذجي هو العمل في مستودع أحادي الجذر (monorepo): تعدّل وحدة أساسية في مكتبة مشتركة، ثم تنتقل إلى الخدمة التي تستخدم هذه الوحدة للتحقق من التكامل. حتى الآن كان عليك في هذه الحالة إغلاق الجلسة وفتح جلسة جديدة في المجلد الآخر، أو تفريغ السياق باستخدام /clear. والنتيجة ليست فقط ضياع سياق المحادثة الذي بنيته حتى تلك اللحظة، بل تكلفة خفية إضافية لا تظهر بسهولة للعين: إبطال ذاكرة التخزين المؤقت للـ prompt بالكامل، بحيث يُحاسَب الطلب التالي بسعر كتابة الذاكرة المؤقتة من جديد. أمر /cd الذي أُدرج بهدوء في Claude Code v2.1.169 يمنع هاتين الخسارتين في آن واحد. يوضّح هذا المقال، استناداً إلى الأسعار المُعلنة في الوثائق الرسمية، لماذا لا يُعد هذا السطر الواحد مجرد ميزة راحة، بل مسألة تتعلق بتكلفة تشغيل وكيل البرمجة.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-hero.png" alt="رسم تجريدي لتدفق بيانات متصل ينقسم إلى مسارين، أحدهما يعيد بناء الكتل بتكلفة عالية والآخر يترك الشبكة تتدفق كما هي" /></p>

<h2 id="نظرة-عامة">نظرة عامة</h2>

<p>يقوم الأمر <code class="language-plaintext highlighter-rouge">/cd &lt;المسار&gt;</code> بنقل جلسة Claude Code الجارية إلى مجلد عمل آخر. لا تُعاد الجلسة من الصفر، لذا ينتقل سجل المحادثة، والنموذج المختار، وإعدادات الأذونات، كلها كما هي إلى المجلد الجديد. حتى هذه النقطة، يبدو الأمر ميزة راحة معتادة. لكن الجوهر الحقيقي يكمن فيما بعد: لا يكسر /cd ذاكرة التخزين المؤقت للـ prompt. الرسالة التي تُرسل مباشرة بعد الانتقال إلى المجلد الجديد تُحاسَب بسعر قراءة الذاكرة المؤقتة، وليس بسعر كتابتها.</p>

<p>سبب أهمية هذا الفارق يكمن في سعر الذاكرة المؤقتة نفسه. وفقاً للأسعار التي أعلنتها Anthropic لتخزين الـ prompt مؤقتاً، فإن قراءة الذاكرة المؤقتة تبلغ نحو 10 بالمئة من سعر الإدخال القياسي، أي 0.1x. في المقابل، تُضاف علاوة تبلغ 1.25x عند الكتابة الجديدة في الذاكرة المؤقتة. عند إعادة تشغيل الجلسة، يجب إعادة كتابة سياق النظام (system prompt) وتعريفات الأدوات وملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الخاص بالمشروع، جميعها من جديد في ذاكرة مؤقتة جديدة. وكلما كان المشروع أكبر، بلغت هذه البادئة (prefix) عشرات الآلاف من الرموز (tokens). أمر /cd لا يعيد كتابة هذه البادئة، بل يقرأها كما هي ويعيد استخدامها.</p>

<p>تشغّل Thaki Cloud في بيئة متعددة المستأجرين وكلاء ومهام دفعية لعملاء متعددين على نفس البنية التحتية. في مثل هذه البيئة، اقتصاديات الرموز تعني مباشرة تكلفة الخدمة. إذا أعاد وكيل البرمجة تخزين البادئة مؤقتاً في كل مرة يتنقل فيها بين المجلدات، فإن هذه التكلفة تتراكم بما يتناسب مع عدد الجلسات وعدد مرات التنقل. إجراء واحد مثل /cd يحافظ على الذاكرة المؤقتة يمكن أن يؤدي في التشغيل واسع النطاق إلى وفورات لا يُستهان بها. لذا فمن الأدق النظر إلى هذه الميزة على أنها مسألة “نظافة تكلفة” وليست مجرد “اختصار مريح”.</p>

<h2 id="ما-هي-هذه-التقنية">ما هي هذه التقنية</h2>

<p>لفهم قيمة /cd، لا بد أولاً من فهم كيفية عمل ذاكرة التخزين المؤقت للـ prompt. يقوم Claude Code تلقائياً بتخزين سياق النظام وتعريفات الأدوات وملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> مؤقتاً في كل دورة (turn)، دون الحاجة إلى أي إعداد إضافي. تشغل هذه البادئة المخزّنة مؤقتاً بداية المحادثة، وتُلحَق بعدها كل رسالة جديدة. إذا ظلت الذاكرة المؤقتة حيّة، تُحاسَب هذه البادئة بسعر القراءة فقط. أما إذا انكسرت الذاكرة المؤقتة، فيجب إعادة كتابة البادئة بأكملها.</p>

<p>عند إعادة تشغيل الجلسة أو تفريغ السياق باستخدام /clear، تُبطَل الذاكرة المؤقتة. لكن الفخّ الكامن في عملية الانتقال بين المجلدات هو أن المجلد الجديد يحتوي غالباً على ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> مختلف. منطقياً، يبدو أن تغيير محتوى <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الذي يدخل في سياق النظام يجب أن يكسر الذاكرة المؤقتة. وهنا يكمن الجزء الذكي في /cd. فبدلاً من إعادة كتابة <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الخاص بالمجلد الوجهة داخل سياق النظام، يُضيفه كرسالة تالية في المحادثة. وبما أن سياق النظام لا يُعاد كتابته، تبقى البادئة المخزّنة مؤقتاً كما هي، ويُعامَل ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الجديد باعتباره مجرد رسالة مستخدم مُلحَقة في النهاية. هذه هي الطريقة التي تحافظ بها الذاكرة المؤقتة على نفسها بينما تعكس قواعد المجلد الجديد في الوقت نفسه.</p>

<p>يوضّح المخطط التالي كيف يتعامل المساران مع الذاكرة المؤقتة بشكل مختلف عند الانتقال بين المجلدات.</p>

<pre><code class="language-mermaid">flowchart TB
    A["جلسة جارية في&lt;br/&gt;المجلد A&lt;br/&gt;(بادئة مخزّنة مؤقتاً نشطة)"] --&gt; B{"حاجة للانتقال&lt;br/&gt;إلى المجلد B"}
    B --&gt;|"إعادة تشغيل أو /clear"| C["إبطال ذاكرة سياق النظام&lt;br/&gt;والأدوات وملف&lt;br/&gt;CLAUDE.md المؤقتة"]
    C --&gt; D["إعادة كتابة البادئة&lt;br/&gt;بأكملها في الذاكرة المؤقتة&lt;br/&gt;(سعر 1.25x)"]
    D --&gt; E["فقدان سياق المحادثة"]
    B --&gt;|"مسار /cd"| F["الحفاظ على سياق النظام&lt;br/&gt;وإلحاق CLAUDE.md&lt;br/&gt;الجديد كرسالة"]
    F --&gt; G["قراءة البادئة&lt;br/&gt;من الذاكرة المؤقتة&lt;br/&gt;(سعر 0.1x)"]
    G --&gt; H["الحفاظ على المحادثة&lt;br/&gt;والنموذج والأذونات&lt;br/&gt;كما هي"]
</code></pre>

<p>جوهر هذا المخطط أن المسار الأيمن لا يمس سياق النظام إطلاقاً. أما المسار الأيسر فيعيد كتابة البادئة وفي الوقت نفسه يفقد كل ما تراكم من محادثة حتى تلك اللحظة. الوجهة واحدة، لكن التكلفة المدفوعة مختلفة تماماً.</p>

<p>سبب بقاء الذاكرة المؤقتة سليمة عند الإلحاق في النهاية هو أن تخزين الـ prompt مؤقتاً يعمل على مستوى البادئة. تعيد الذاكرة المؤقتة استخدام الجزء الذي يظل مطابقاً لبداية المحادثة، أي جزء البادئة. فإذا تغيّر حرف واحد في البادئة، يجب إعادة حساب كل ما يليها من تلك النقطة فصاعداً. لذلك فإن وضع محتوى يتغيّر باستمرار في البداية يقلّل من معدل إصابة الذاكرة المؤقتة (cache hit rate)، بينما وضع محتوى مستقر في البداية وإلحاق ما يتغيّر في النهاية يرفع هذا المعدل. تصميم /cd الذي يُلحق ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الجديد كرسالة في نهاية المحادثة بدلاً من سياق النظام هو بالضبط التزام بهذا المبدأ: عدم لمس البادئة المخزّنة مؤقتاً، واستيعاب التغيير خارج حدود الذاكرة المؤقتة.</p>

<h2 id="التثبيت-والدمج">التثبيت والدمج</h2>

<p>لا يحتاج /cd إلى أي تثبيت منفصل. يمكن استخدامه مباشرة اعتباراً من Claude Code v2.1.169 فما فوق. صدر هذا الأمر في 8 يونيو 2026. طريقة الاستخدام بسيطة.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># الانتقال إلى مجلد آخر داخل الجلسة</span>
/cd ../consuming-service

<span class="c"># يمكن أيضاً استخدام مسار مطلق</span>
/cd /Users/me/repo/apps/web

<span class="c"># مسار نسبي إلى المجلد الرئيسي</span>
/cd ~/repo/packages/core
</code></pre></div></div>

<p>عند تنفيذ الأمر، يقوم Claude Code بتحديث مجلد العمل، ويقرأ ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الموجود في الموقع الجديد ويُلحقه بالمحادثة، ثم يواصل العمل الجاري. وبما أن سجل المحادثة والقرارات المتخذة حتى تلك اللحظة تبقى محفوظة، فإن طلباً مثل “تحقق من أن الواجهة تستخدم الواجهة البرمجية التي عدّلتها للتو في الوحدة الأساسية” ينساب بشكل طبيعي.</p>

<p>لنأخذ مثالاً محدداً. تُجمّع بيئة عمل منصة Thaki Cloud سبعة مستودعات منتجات، منها الواجهة الخلفية بلغة Go، والواجهة الأمامية، ونشر GitOps، وشبكة الوصل متعددة النطاقات (multi-cluster mesh)، وذلك عبر وحدات فرعية (git submodules). إن تعديل مخطط استجابة واجهة برمجية خلفية ثم التحقق من ظهور الشاشة بشكل صحيح في الواجهة الأمامية التي تستهلك هذا المخطط هو عمل يومي في هذا الهيكل. في الطريقة القديمة، كان يجب إغلاق جلسة الواجهة الخلفية وفتح جلسة جديدة في مجلد الواجهة الأمامية، ثم إعادة شرح ما تم تغييره ولماذا في الجلسة الجديدة. مع /cd لا ينقطع سير العمل.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># جارٍ تعديل المخطط في الوحدة الفرعية الخلفية</span>
<span class="c"># ...</span>

<span class="c"># الانتقال إلى الواجهة الأمامية التي تستهلك هذا المخطط (مع الحفاظ على السياق والذاكرة المؤقتة)</span>
/cd ../ai-suite/apps/web

<span class="c"># السؤال مباشرة: هل تُشير هذه الشاشة إلى اسم الحقل الذي تم تعديله للتو؟</span>
</code></pre></div></div>

<p>فور الانتقال، يُلحَق ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الخاص بمجلد الواجهة الأمامية بالمحادثة، فتنعكس فوراً قواعد ذلك المستودع (مثل حدود FSD أو استخدام رموز TDS). وفي الوقت نفسه، يبقى السياق المتراكم من العمل على الواجهة الخلفية، أي أي حقل تم تعديله ولماذا، حياً، مما يسمح بالانتقال مباشرة إلى التحقق.</p>

<p>لفهم اقتصاديات الذاكرة المؤقتة، لا بد من الاطلاع على جدول الأسعار. الجدول التالي يلخّص أسعار تخزين الـ prompt مؤقتاً التي أعلنتها Anthropic.</p>

<table>
  <thead>
    <tr>
      <th>البند</th>
      <th>السعر مقارنة بالإدخال القياسي</th>
      <th>الوصف</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>قراءة الذاكرة المؤقتة</td>
      <td>0.1x</td>
      <td>إعادة استخدام البادئة المخزّنة مؤقتاً، خصم 90 بالمئة</td>
    </tr>
    <tr>
      <td>كتابة الذاكرة المؤقتة (مدة صلاحية 5 دقائق)</td>
      <td>1.25x</td>
      <td>تسجيل بادئة جديدة في الذاكرة المؤقتة، تُستَرد التكلفة عند أول قراءة</td>
    </tr>
    <tr>
      <td>كتابة الذاكرة المؤقتة (مدة صلاحية ساعة واحدة)</td>
      <td>2.0x</td>
      <td>عند تفعيل <code class="language-plaintext highlighter-rouge">ENABLE_PROMPT_CACHING_1H=1</code></td>
    </tr>
    <tr>
      <td>إدخال دون استخدام ذاكرة مؤقتة</td>
      <td>1.0x</td>
      <td>السعر الأساسي</td>
    </tr>
  </tbody>
</table>

<p>هناك سياق واحد يستحق الانتباه. خفّضت Anthropic بهدوء في مارس 2026 مدة صلاحية الذاكرة المؤقتة الافتراضية (TTL) من 60 دقيقة إلى 5 دقائق. إذا لم يصل طلب تالٍ خلال 5 دقائق، تنتهي صلاحية الذاكرة المؤقتة وتُدفَع تكلفة الكتابة من جديد. إذا كنت تعمل بفواصل زمنية طويلة، يمكن التفكير في تفعيل خيار الساعة الواحدة، لكن علاوة الكتابة ترتفع إلى 2.0x، لذا يجب موازنة المقايضة. أمر /cd هو ما يحافظ على الذاكرة المؤقتة حيّة عند استمرار الجلسة ضمن هذه المدة، لذا أصبح أكثر أهمية في عصر مدة الصلاحية القصيرة.</p>

<h2 id="نتائج-التجربة-الفعلية">نتائج التجربة الفعلية</h2>

<p>بصراحة، /cd أمر تفاعلي يُكتب بالشرطة المائلة، ولذلك لم نتمكن في البيئة غير التفاعلية (headless) التي كُتب فيها هذا المقال من تشغيل جلسة فعلية وإجراء قياس أداء تفاعلي. لذا، بدلاً من اختلاق أرقام قياس، نعرض نموذج تكلفة يمكن حسابه اعتماداً فقط على الأسعار المُعلَنة. الأرقام أدناه ليست قيماً مقيسة، بل حسابات مبنية على الأسعار الرسمية في الوثائق، ونوضّح ذلك بجلاء.</p>

<p>لنقارن المسارين من حيث كيفية احتساب البادئة المخزّنة مؤقتاً في أول طلب مباشرة بعد الانتقال بين المجلدات. في مسار إعادة التشغيل أو /clear، تُسجَّل البادئة من جديد بسعر كتابة الذاكرة المؤقتة (1.25x). أما في مسار /cd، فتُعاد استخدام البادئة نفسها بسعر قراءة الذاكرة المؤقتة (0.1x). إذا افترضنا أن حجم البادئة متساوٍ في الحالتين، فإن نسبة التكلفة المدفوعة مقابل إعادة احتساب البادئة مباشرة بعد الانتقال هي 1.25 مقسومة على 0.1، أي 12.5 مرة. بعبارة أخرى، مسار إعادة التشغيل أغلى بنحو 12.5 مرة من مسار /cd من حيث إعادة احتساب البادئة.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-results.png" alt="مقارنة تكلفة البادئة المخزّنة مؤقتاً عند الانتقال بين المجلدات: مسار إعادة التشغيل/إعادة التخزين المؤقت يُحاسَب بسعر كتابة 1.25x، بينما مسار /cd يُحاسَب بسعر قراءة 0.1x، بفارق نحو 12.5 مرة وفقاً للأسعار الرسمية في الوثائق" /></p>

<p>هذه النسبة تصح بغضّ النظر عن العدد المطلق لرموز البادئة. غير أن قيمة الوفورات المطلقة تزداد كلما كانت البادئة أكبر. في المشاريع الكبيرة، من الشائع[تقديري] أن تصل البادئة المكوّنة من سياق النظام وتعريفات الأدوات وملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الضخم إلى عشرات الآلاف من الرموز، وفي مثل هذه الجلسات، إذا تنقّل المستخدم بين المجلدات عدة مرات يومياً، تتراكم تكلفة إعادة التخزين المؤقت بسرعة. أمر /cd يخفّض علاوة الـ 12.5 مرة التي تُضاف عند كل انتقال إلى سعر القراءة فقط.</p>

<p>نقطة أخرى تستحق الإشارة إليها هي أن ما يحافظ عليه /cd ليس التكلفة فقط. سياق المحادثة الذي يُفقَد في مسار إعادة التشغيل هو تكلفة يصعب ترجمتها إلى رموز. فإذا اضطررت لإعادة شرح نيّة الكود الذي عدّلته للتو، والفرضيات التي وضعتها سابقاً، والمقاربات التي استبعدتها بالفعل، فإن ذلك يستهلك وقتاً بشرياً ورموزاً إضافية معاً. يزيل /cd هذه التكلفة المرتبطة بإعادة الشرح أيضاً.</p>

<h2 id="دلالات-التطبيق-في-منتجات-thaki-cloud">دلالات التطبيق في منتجات Thaki Cloud</h2>

<p>لهذه الميزة أهمية من منظور منتجَي Thaki Cloud كليهما.</p>

<p>من منظور Paxis، يلامس /cd بدقة مسألة نظافة جلسات وكيل البرمجة. Paxis هو السحابة الأصلية للوكلاء (Agent-Native Cloud) لدى Thaki Cloud، حيث تُعامَل المهارات (skills) والأدوات والسياسات وسجلات التدقيق كموارد أساسية من الدرجة الأولى، ويُشغَّل الوكيل داخل بيئة معزولة (sandbox). التنقل بين مستودعات ووحدات فرعية متعددة أثناء عمل وكيل البرمجة هو سيناريو شائع في Paxis. وإذا أعاد الوكيل تشغيل الجلسة عند كل انتقال، فإن ذلك يعني إعادة احتساب سياق مهارات وسياسات ضخم في كل مرة. الأسلوب الذي يحافظ على البادئة ويُلحق قواعد المجلد كرسالة فقط، كما يفعل /cd، ينسجم جيداً مع نموذج تنسيق (orchestration) Paxis الذي يبدّل مسار العمل فقط مع الحفاظ على اختيار المهارات وبوابات السياسات. فكرة عدم إعادة كتابة سياق النظام وإلحاق السياق في النهاية بدلاً من ذلك هي بعينها المبدأ الذي يُدار به طبقة القواعد المُحمَّلة باستمرار من منظور استقرار الذاكرة المؤقتة.</p>

<p>ومن منظور ai-platform، تُعد اقتصاديات الذاكرة المؤقتة تكلفة الخدمة متعددة المستأجرين مباشرة. تُشغّل منصة ai-platform لدى Thaki Cloud أحمال استدلال (inference) لعملاء متعددين فوق جدولة GPU قائمة على K8s وKueue. تخزين الـ prompt مؤقتاً هو رافعة أساسية لخفض تكلفة الإدخال عبر إعادة استخدام البادئات المتكررة، والمبدأ الذي يُظهره /cd، أي إضافة السياق في نهاية المحادثة وليس في بدايتها كي لا تنكسر الذاكرة المؤقتة، يُطبَّق كما هو في مكدّس الخدمة الخاص بالمنصة. تصميم بنية الـ prompt بحيث تُقلَّل نقاط إبطال الذاكرة المؤقتة يمنح تنافسية عند تكلفة خدمة منخفضة. والعدستان تُكمّلان إحداهما الأخرى: تكلفة الخدمة المنخفضة (ai-platform) تصنع اقتصاديات الوكيل (Paxis)، وسلوك الوكيل الذي يحافظ على الذاكرة المؤقتة (Paxis) يخفّض بدوره حمل البنية التحتية.</p>

<h2 id="القيود-والاعتراضات">القيود والاعتراضات</h2>

<p>/cd ليس حلاً سحرياً. أولاً، الحفاظ على الذاكرة المؤقتة له معنى فقط ضمن مدة الصلاحية البالغة 5 دقائق. إذا تركت المجلد بعد الانتقال إليه لفترة طويلة دون نشاط، تنتهي صلاحية الذاكرة المؤقتة، وسواء استخدمت /cd أم لا، سيُحاسَب الطلب التالي بتكلفة الكتابة. ونظراً لقصر مدة الصلاحية، تكون وفورات /cd في أعلى مستوياتها في سير العمل المتواصل، بينما تتضاءل فائدتها في العمل المتقطّع.</p>

<p>ثانياً، هناك فخّ دقيق في أسلوب إلحاق ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> كرسالة بدلاً من إدراجه في سياق النظام. إذا عدّلت ملف <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> الأصلي للمشروع أثناء الجلسة، فإن هذا التعديل لا يكسر الذاكرة المؤقتة، لكنه في المقابل لا يُطبَّق حتى تنفّذ /clear أو /compact أو تُعيد تشغيل الجلسة. أي قد ينشأ وضع تُغيَّر فيه القواعد دون أن تعكسه الجلسة، لذا يجب تحديث الجلسة عمداً بعد تغيير القواعد.</p>

<p>ثالثاً، نسبة توفير الذاكرة المؤقتة البالغة 12.5 مرة هي في نهاية المطاف حساب مبني على الأسعار الرسمية في الوثائق فيما يخص إعادة احتساب البادئة مباشرة بعد الانتقال. أما الوفورات المُحَسّة فعلياً في التكلفة الإجمالية للجلسة، فتختلف بحسب حصة البادئة من التكلفة الكلية، وطول المحادثة، وتكرار الانتقالات. لا ينبغي تفسير نسبة هذا المقال على أنها “تكلفة الجلسة تنخفض 12.5 مرة”. الأصح هو أن الوفورات تتمثل تحديداً في “عدم الحاجة إلى إعادة تخزين البادئة مؤقتاً عند لحظة الانتقال”.</p>

<p>ومع ذلك، فإن الخلاصة واضحة. إذا كنت تتنقل بين المجلدات بشكل متكرر في مشروع أحادي الجذر أو في مستودعات متعددة، فإن /cd هو أرخص طريقة للحفاظ على سياق المحادثة وذاكرة التخزين المؤقت للـ prompt في آن واحد. إذا كان فريقك يُشغّل وكلاء البرمجة مع مراعاة التكلفة، فهناك ما يكفي من الأسباب لجعل هذا السطر الواحد عادة راسخة.</p>

<h2 id="المصادر">المصادر</h2>

<ul>
  <li><a href="https://code.claude.com/docs/en/sessions">Manage sessions - Claude Code Docs</a></li>
  <li><a href="https://code.claude.com/docs/en/prompt-caching">How Claude Code uses prompt caching - Claude Code Docs</a></li>
  <li><a href="https://claudcod.com/blog/claude-code-cd-command/">Claude Code /cd: Switch Projects Without Losing Cache</a></li>
  <li><a href="https://x.com/hjguyhan/status/2074414356058763747">التغريدة الأصلية (إعادة تغريد @delba_oliveira)</a></li>
</ul>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="dev" /><category term="claude-code" /><category term="prompt-caching" /><category term="ai-agent" /><category term="developer-tools" /><category term="cost-optimization" /><summary type="html"><![CDATA[في المستودعات أحادية الجذر (monorepo)، عندما تتنقل بين مجلد مكتبة ومجلد خدمة تستهلكها، تؤدي إعادة تشغيل الجلسة إلى فقدان سياق المحادثة وإبطال ذاكرة التخزين المؤقت للـ prompt معاً. أمر /cd الذي أُدرج في Claude Code v2.1.169 ينقل الجلسة الجارية إلى مجلد آخر مع الحفاظ على الذاكرة المؤقتة كما هي. استناداً إلى الفارق بين سعر قراءة الذاكرة المؤقتة (0.1x) وسعر كتابتها (1.25x)، نوضح لماذا يغيّر هذا السطر الواحد تكلفة تشغيل وكيل البرمجة بشكل كبير، ونربط ذلك بوكيل البرمجة Paxis وتكلفة الخدمة في ai-platform لدى Thaki Cloud.]]></summary></entry><entry xml:lang="ar"><title type="html">تقييم لا يثق برقم واحد: بناء خدمة حكم سيادية للنماذج اللغوية الكبيرة عبر التفكيك الثنائي وبوابات حتمية</title><link href="https://thakicloud.github.io/ar/research/atomic-binary-judge-eval-service/" rel="alternate" type="text/html" title="تقييم لا يثق برقم واحد: بناء خدمة حكم سيادية للنماذج اللغوية الكبيرة عبر التفكيك الثنائي وبوابات حتمية" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/ar/research/atomic-binary-judge-eval-service</id><content type="html" xml:base="https://thakicloud.github.io/ar/research/atomic-binary-judge-eval-service/"><![CDATA[<h2 id="لمن-هذا-المقال">لمن هذا المقال</h2>

<p>هذا المقال موجه للمهندسين الذين يشغّلون خطوط تقييم آلية تصحّح مخرجات النماذج اللغوية الكبيرة، أو الذين يسعون لتقديم تقييم النماذج كخدمة فوق عنقود GPU مشترك بين عدة فرق داخلية. يتناول المقال مدى هشاشة أسلوب “اطلب من النموذج اللغوي أن يعطي درجة من 1 إلى 10”، وما الذي ينبغي تركه للنموذج وما الذي يجب أن يتولاه الكود لإزالة هذه الهشاشة. الأمر وثيق الصلة بشكل خاص بالمؤسسات في الصناعات المنظّمة أو الجهات الحكومية التي لا يمكنها إرسال بياناتها خارج جدرانها، وبالتالي لا يمكنها الاعتماد على حكم عبر واجهة برمجية من نماذج طليعية.</p>

<h2 id="جوهر-المشكلة-قياس-الجودة-برقم-واحد-أسلوب-بدأ-ينهار-بالفعل">جوهر المشكلة: قياس الجودة برقم واحد أسلوب بدأ ينهار بالفعل</h2>

<p>مع تجاوز وتيرة تطوير النماذج ومراجعة السلامة بكثير سرعة تصحيح البشر يدوياً، أصبح أسلوب LLM-as-a-judge، حيث يقيّم نموذج لغوي كبير مخرجات نموذج آخر، ممارسة أساسية بحكم الأمر الواقع. غير أن هذه الممارسة تقوم على افتراض أن قيمة قياسية واحدة يصدرها نموذج مجمّد تتبع الدرجة التي كان سيمنحها إنسان، والأبحاث المتراكمة خلال 2026 قوّضت هذا الافتراض خطوة بخطوة. فنماذج الحكم تقلب أحكامها بناءً على إشارات سطحية مثل صياغة الطلب أو موضع الإجابة، وتضغط طرفي مقياس التصحيح نحو القيمة الوسطى فتطمس بالضبط الحالات المتطرفة التي يفترض أن تُرصد، وتفرط في الثقة بأحكامها رغم أن هذه الثقة غير معايرة، وحين يعبث فريق أحمر بالمدخل قليلاً يصبح الحكم أقرب إلى رمي العملة. أدوات كشف التحيّز الآلية والتشخيصات المبنية على نظرية استجابة البند تؤكد هذا التذبذب على نطاق واسع وبشكل كمّي.</p>

<p>استجابة مجتمع البحث لهذه المشكلة تنقسم عموماً إلى اتجاهين. الأول يطرح على النموذج أسئلة قابلة للتفسير بنعم أو لا بدلاً من درجة، إذ يفكك بحث مثل BINEVAL معايير التقييم إلى أسئلة ثنائية ويوازي أو يتفوق على أداء الحكم القياسي أو المقارنة الثنائية، مع كشف أي معيار فرعي فشل بالتحديد. أما الاتجاه الثاني فيضيف بنية حول الحكم نفسه، مستخدماً هيئات محلّفين من عدة حكّام، ومناظرات، ووحدات تحقق، لزيادة “الحوسبة التي ينفقها الحكم” وبالتالي رفع متانته، أو يستخدم تسلسلات تقييم انتقائية تحيل فقط الحالات غير المؤكدة قدماً لضمان توافق بمستوى بشري.</p>

<p>المشكلة أن كلا الاتجاهين يُختبر غالباً على معايير مرجعية غير متصلة على جهاز واحد فقط. أما الواقع الذي تواجهه المؤسسات التي تهمها سيادة البيانات، مثل المستشفيات والبنوك ومعاهد البحث الحكومية، فيختلف في ثلاث نقاط. فبما أن البيانات لا يمكن أن تخرج من المنشأة، يجب أن يعمل التقييم على عنقود GPU مشترك تملكه المؤسسة وليس عبر واجهة برمجية من نموذج طليعي؛ وبما أن عدة فرق تتنافس على المسرّعات نفسها، يجب أن تلتزم خدمة التقييم بميزانيات التكلفة وزمن الاستجابة الذيلي لكل مستأجر؛ وبما أن الجهة الرقابية تسأل ليس “كم الدرجة” بل “لماذا هذه الدرجة”، فإن رقماً قياسياً غير شفاف لا يستطيع الإجابة عن هذا السؤال.</p>

<h2 id="المساهمة-الجوهرية-الانضباطات-الأربعة-التي-تجمعها-abj-gate">المساهمة الجوهرية: الانضباطات الأربعة التي تجمعها ABJ-Gate</h2>

<p>بناءً على هذه الشروط الواقعية الثلاثة، يقترح فريق أبحاث ThakiCloud AI معمارية <strong>ABJ-Gate</strong> التي تجمع تيّاري البحث في واحد. جوهرها أن كل معيار تقييم يُفكّك إلى سؤال ثنائي أولي يجيب عليه نموذج عامل صغير محلي، بينما يُترك تجميع تلك الإجابات وتوحيد صيغتها ومعايرتها والاحتفاظ بسجل تدقيق كلها للكود الحتمي وليس للنموذج. أي بند يقع على حدّ فاصل متنازع عليه أو تُرصد بشأنه إشارة شك يُرسل دائماً إلى عدد فردي من عمّال متشككين مستقلين يُطلب منهم “محاولة دحض هذا”، ويُطرح للتصويت؛ ولا يصمد الحكم إلا حين تفشل الأغلبية في دحضه. وميزانية كل نداء من نداءات النموذج اللغوي هذه توزّعها جدولة قائمة على Kueue/GPU ضمن حدود التكلفة والزمن الذيلي لكل مستأجر.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig1_cost_frontier.png" alt="نسبة أخذ العينات مقابل التكلفة النسبية بحسب نموذج التكلفة التحليلي (المعادلة 8)" />
<em>نتيجة محسوبة من النموذج التحليلي بافتراض 5 معايير ثنائية، ونسبة تصعيد 10%، و3 متشككين. تشغيل الحكم الثنائي الكامل على كل بند (k=1) يرفع التكلفة إلى نحو 5.3 أضعاف تكلفة الحكم القياسي، لكن المعايرة بأسلوب conformal التي تقلّل التصعيدات وتخفض نسبة أخذ العينات k إلى 0.2 تقرّب التكلفة إلى نحو 1.06 ضعف تكلفة الحكم القياسي مع الحفاظ على قابلية التفسير والمعايرة. هذه نتيجة حسابية من المعادلة 8 وليست قياساً فعلياً من معيار مرجعي.</em></p>

<p>هذا التصميم هو أيضاً ترقية لانضباطين تلتزم بهما الشركة أصلاً بشكل دائم في بنيتها الداخلية، وهما مبدأ “الكود يملك الصيغة والنموذج يملك المحتوى”، ومبدأ إغلاق نتائج التحقق الموزّعة دائماً بتصويت عدائي، إلى واجهة منتج رسمية مشتركة بين عدة مستأجرين. مهما بدا تقرير النموذج العامل عن نفسه، من حيث طول إجابته أو عددها أو “الدرجة الإجمالية من كذا”، مقنعاً، فإن تلك القيمة تُهمل ويعيد الكود حسابها، بحيث لا تستطيع الاهتزازات الطفيفة لدى العامل تلويث النتيجة النهائية.</p>

<p>الوعود التي يجب أن تفي بها هذه المعمارية فعلياً تُصاغ وتُثبت كثلاث خصائص. أولاً، قابلية إعادة الإنتاج: بمعطى نفس مجموعة الإجابات الثنائية، تنتج الدرجة المجمّعة دائماً القيمة نفسها بغضّ النظر عن البذرة العشوائية أو ترتيب الطلبات. ثانياً، ضمان ضبط المخاطر: معايرة مدى تكرار اختلاف الحكم الرخيص من المرحلة الأولى عن التحقق المكلف من المرحلة الثانية عبر ضبط مخاطر conformal تُبقي معدل هذا الاختلاف تحت مستوى مستهدف بصرف النظر عن التوزيع الذي تُستمد منه البنود. ثالثاً، خاصية مفادها أنه إذا أبقت سياسة قبول معدل استخدام كل مستأجر تحت عتبة معينة، فإن نظرية الطوابير تحدّ من زمن تقييم ذلك المستأجر بقيمة منتهية.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig2_latency_bound.png" alt="رسم مفاهيمي لمعدل استخدام المستأجر مقابل زمن الانتظار المتوقع في الطابور (الافتراض 3)" />
<em>منحنى مفاهيمي توضيحي يبيّن كيف يتصاعد زمن الانتظار مع اقتراب معدل الاستخدام من 1 في نموذج طابور M/G/c. يصوّر هذا حجة الافتراض 3 القائلة بأن التحكم في القبول يمكن أن يدير زمن الاستجابة الذيلي عبر ضبط نسبة أخذ العينات لإبقاء معدل الاستخدام تحت عتبة مستهدفة، وليس بيانات زمن انتظار فعلية مقاسة.</em></p>

<p>يوضّح البحث أيضاً بشكل كمّي متى يكون التفكيك الثنائي مفيداً فعلاً. فحين يمكن للإنسان الإجابة عن كل معيار بشكل أكثر ثباتاً من التصحيح القياسي، وتكون المعايير ضعيفة الارتباط فيما بينها بحيث تحمل معلومات مستقلة عن بعضها، يُثبت أن التفكيك الثنائي مع التحقق بالأغلبية ينتج تبايناً أقل بشكل صارم من الحكم القياسي. وفي المقابل، يوضّح البحث بالمثل أنه إذا كانت المعايير متشابكة فيما بينها، أو كانت الأسئلة الثنائية نفسها سهلة الخداع، فإن التفكيك لا يفيد بل قد يزيد التحيّز.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig3_variance_reduction.png" alt="الشروط التي يقلّل عندها تفكيك المعايير من التباين" />
<em>رسم مفاهيمي يصوّر الحجة التحليلية في القسم 4.4 من البحث. يتناقص تباين الدرجة المجمّعة تقريباً بما يتناسب مع تباين الخطأ لكل معيار مقسوماً على عدد المعايير المستقلة فعلياً، ويُظهر الاتجاه النسبي لتقليل التباين مقارنة بخط أساس (الحكم القياسي = 1 ضعف). هذه ليست أرقاماً مقاسة تجريبياً.</em></p>

<h2 id="ما-يتركه-للشركة-والمجتمع-والعلم">ما يتركه للشركة والمجتمع والعلم</h2>

<p>من منظور الشركة، يجمع هذا البحث حكماً مفكّكاً ثنائياً يعمل فوق بنية جدولة GPU الداخلية للشركة، وبوابة تجميع حتمية، وجدولة أخذ عينات تلبّي حدود التكلفة والزمن لكل مستأجر، في تصميم واحد مكتمل. إنه رفع لانضباط داخلي كان مطبقاً أصلاً إلى واجهة منتج مشتركة بين عدة مستأجرين. أما اجتماعياً، فيفتح طريقاً أمام مؤسسات الصناعات المنظّمة التي لم تكن قادرة على استخدام خدمات تقييم عبر واجهات برمجية من نماذج طليعية بسبب عدم إمكانية إخراج بياناتها، لإجراء التحقق من السلامة والجودة قبل النشر على عتادها الخاص، بشكل دائم وقابل لإعادة الإنتاج والتدقيق. وهذا يخفّض عتبة الدخول إلى نشر ذكاء اصطناعي موثوق. أما علمياً، فيرسي إطاراً لقياس العلاقة بين موثوقية الحكم وتكلفته حين يُجمع بين فكرة التفكيك الثنائي والمعايرة وتصويت التحقق العدائي والتجميع الحتمي وأخذ العينات المقيّد بالتكلفة، ويقدّم إلى جانب ذلك الإطار بروتوكولاً مسجّلاً مسبقاً للتحقق من تلك العلاقة تجريبياً استناداً إلى أدبيات الأشهر الستة الماضية.</p>

<h2 id="القيود">القيود</h2>

<p>يوضّح البحث بنفسه قيوده بصراحة. هذا العمل يقدّم فقط المعمارية والبراهين النظرية الثلاثة ونموذج التكلفة التحليلي وبروتوكولاً مسجّلاً مسبقاً للتحقق من تلك الحدود مقابل تصنيفات بشرية، ولا يتضمن أرقام دقة مقاسة فعلياً. يؤكد المؤلفون صراحة أن الإبلاغ عن أرقام دون تشغيل البروتوكول فعلياً هو بحد ذاته تلفيق، وقد تركوا الأرقام فارغة عن قصد. إلى جانب ذلك، يذكر البحث صراحة كقيود أن صياغة الأسئلة الثنائية نفسها قابلة للخداع، وأن دالة المعايرة يمكن أن تنحرف تحت عائلات نماذج جديدة أو هجمات عدائية متطورة، وأن الاستدلال الذي يكتفي بفحص بقاء الرابط حياً يفوّت فشلاً أكثر تعقيداً مثل صفحات 404 الناعمة، وأن حجة تقليل التباين نفسها تنهار حين تكون المعايير متشابكة. كما يقرّ بأن نماذج العمّال الصغيرة المحلية أضعف أصلاً من الحكّام بمستوى طليعي، بحيث أن مقابل الحصول على قابلية التفسير والمعايرة وإعادة الإنتاج وحدود التكلفة، يتنازل النظام عن جزء من الدقة كحكم مستقل.</p>

<p>تفاصيل البحث الكاملة متاحة على Hugging Face: <a href="https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service">https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service</a></p>

<h2 id="شرائح-ذات-صلة">شرائح ذات صلة</h2>

<p>هذه الشرائح تلخّص محتوى هذا المقال باستخدام NotebookLM (نمط <code class="language-plaintext highlighter-rouge">neo_swiss</code>).</p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-01.png" alt="atomic-binary-judge-eval-service slide 1" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-02.png" alt="atomic-binary-judge-eval-service slide 2" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-03.png" alt="atomic-binary-judge-eval-service slide 3" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-04.png" alt="atomic-binary-judge-eval-service slide 4" /></p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="research" /><category term="research" /><category term="llm-as-a-judge" /><category term="eval-as-a-service" /><category term="model-evaluation" /><category term="conformal-prediction" /><category term="multi-tenancy" /><category term="kueue" /><category term="on-prem-llm" /><summary type="html"><![CDATA[أصبح استخدام نموذج لغوي كبير كمقيّم، وهو ما يعرف بـ LLM-as-a-judge، الممارسة الافتراضية في تطوير النماذج، لكن الأدلة التي تراكمت خلال عام 2026 تظهر أن الحكم القياسي الذي ينتج درجة واحدة يكون هشاً أمام صياغة الطلب وموضع الإجابة، وينحاز نحو القيم الوسطى، وينهار إلى مستوى رمي العملة أمام المدخلات العدائية. وفي المجموعات متعددة المستأجرين المحلية داخل المستشفيات والبنوك والجهات الحكومية، حيث لا يمكن إخراج البيانات إطلاقاً، تُضاف قيود أخرى على التكلفة والزمن وقابلية التدقيق. يقدم فريق أبحاث ThakiCloud AI معمارية ABJ-Gate التي تفكك معايير التقييم إلى أسئلة ثنائية أولية، وتجعل التجميع والتحقق والجدولة كلها بيد الكود الحتمي.]]></summary></entry><entry xml:lang="en"><title type="html">Claude Code /cd: How to Move Between Directories Without Restarting Your Session and Keep the Prompt Cache Intact</title><link href="https://thakicloud.github.io/en/dev/claude-code-cd-prompt-cache/" rel="alternate" type="text/html" title="Claude Code /cd: How to Move Between Directories Without Restarting Your Session and Keep the Prompt Cache Intact" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/en/dev/claude-code-cd-prompt-cache</id><content type="html" xml:base="https://thakicloud.github.io/en/dev/claude-code-cd-prompt-cache/"><![CDATA[<p>Anyone who works with a coding agent long enough eventually has to switch directories. The classic case is a monorepo: you fix something in a core module inside a shared library, then move to the service that consumes it to verify the integration. Until now, that meant closing the session and reopening it in the new directory, or clearing the context with <code class="language-plaintext highlighter-rouge">/clear</code>. Either way, all the conversation context you had built up disappeared, and a less visible cost kicked in as well: the prompt cache was invalidated entirely, so the next request got billed at the cache-write rate all over again. The <code class="language-plaintext highlighter-rouge">/cd</code> command, quietly added in Claude Code v2.1.169, prevents both of these losses at once. This post looks at why that one line is not just a convenience feature but a real question of coding agent operating cost, using the rates Anthropic has published.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-hero.png" alt="Abstract concept of a continuous data stream forking into two paths, one expensively rebuilding blocks and the other letting the lattice flow onward intact" /></p>

<h2 id="overview">Overview</h2>

<p><code class="language-plaintext highlighter-rouge">/cd &lt;path&gt;</code> moves a running Claude Code session to a different working directory. Because the session is not restarted, the conversation history, the selected model, and the permission settings all carry over to the new directory intact. So far this sounds like an ordinary convenience feature. The real point is what happens next: <code class="language-plaintext highlighter-rouge">/cd</code> does not break the prompt cache. The first message you send right after switching directories gets billed at the cache-read price, not the cache-write price.</p>

<p>This distinction matters because of how steep the cache rates actually are. In Anthropic’s published prompt caching rates, a cache read costs roughly 10 percent of the standard input price, or 0.1x. Writing fresh content into the cache, on the other hand, carries a 1.25x premium over the base input rate. When you restart a session, the system prompt, the tool definitions, and the project’s <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> all have to be written into a fresh cache. On a large project, that prefix can run to tens of thousands of tokens. <code class="language-plaintext highlighter-rouge">/cd</code> avoids rewriting that prefix; it simply reads and reuses it.</p>

<p>ThakiCloud runs multiple customers’ agents and batch jobs on shared infrastructure in a multi-tenant environment. In that kind of setting, token economics is service cost. If a coding agent re-caches its prefix every time it switches directories, that cost accumulates in proportion to session count and switch frequency. A single behavior that preserves the cache, like <code class="language-plaintext highlighter-rouge">/cd</code>, adds up to a real saving at scale. That is why this feature is better understood as a matter of cost hygiene than as a handy shortcut.</p>

<h2 id="what-is-this-technology">What Is This Technology</h2>

<p>To see the value of <code class="language-plaintext highlighter-rouge">/cd</code>, it helps to first understand how the prompt cache works. Claude Code automatically caches the system prompt, tool definitions, and <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> on every turn, with no configuration required. This cached prefix sits at the front of the conversation, and each new message is appended after it. As long as the cache is alive, that prefix is billed only at the read rate. Once the cache breaks, the entire prefix has to be written again.</p>

<p>Restarting a session or clearing context with <code class="language-plaintext highlighter-rouge">/clear</code> invalidates the cache. But switching directories has a hidden trap: the new directory has its own <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>. Intuitively, you’d expect the cache to break the moment the <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> that feeds into the system prompt changes. This is exactly where <code class="language-plaintext highlighter-rouge">/cd</code> is clever. Instead of rewriting the destination directory’s <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> into the system prompt, it appends it as the next message in the conversation. Because the system prompt is never rewritten, the cached prefix stays intact, and the new <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> is simply handled as one more user message tacked on at the end. That is how it applies the new directory’s rules while still protecting the cache.</p>

<p>The diagram below shows how the two paths handle the cache differently when you switch directories.</p>

<pre><code class="language-mermaid">flowchart TB
    A["Session running&lt;br/&gt;in directory A&lt;br/&gt;(prefix cache active)"] --&gt; B{"Need to move&lt;br/&gt;to directory B"}
    B --&gt;|"Restart or /clear"| C["System prompt, tools,&lt;br/&gt;and CLAUDE.md cache invalidated"]
    C --&gt; D["Entire prefix&lt;br/&gt;written to cache again&lt;br/&gt;(1.25x rate)"]
    D --&gt; E["Conversation context lost"]
    B --&gt;|"/cd path"| F["System prompt preserved&lt;br/&gt;new CLAUDE.md&lt;br/&gt;appended as a message"]
    F --&gt; G["Prefix cache read&lt;br/&gt;(0.1x rate)"]
    G --&gt; H["Conversation, model,&lt;br/&gt;and permissions preserved"]
</code></pre>

<p>The key point in this diagram is that the right-hand path never touches the system prompt. The left-hand path rewrites the prefix and throws away all the conversation you had accumulated along with it. Both paths arrive at the same destination, but the cost you pay to get there is completely different.</p>

<p>The reason appending works is that prompt caching operates at the level of the prefix. The cache reuses however much of the front of the conversation, the prefix, is identical to before. If even a single character in that prefix changes, everything from that point onward has to be recomputed. That’s why putting content that changes frequently near the front hurts the cache hit rate, while putting stable content at the front and letting variable content trail behind it keeps the hit rate high. <code class="language-plaintext highlighter-rouge">/cd</code> appending the new <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> as a message at the end of the conversation, rather than folding it into the system prompt, is a design that respects exactly this principle. It leaves the cached prefix untouched and absorbs all the change outside the cache boundary.</p>

<h2 id="installation-and-integration">Installation and Integration</h2>

<p><code class="language-plaintext highlighter-rouge">/cd</code> requires no separate installation. It works out of the box on Claude Code v2.1.169 or later. The command shipped on June 8, 2026. Usage is straightforward.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Move to another directory within the session</span>
/cd ../consuming-service

<span class="c"># Absolute paths work too</span>
/cd /Users/me/repo/apps/web

<span class="c"># Home-relative paths</span>
/cd ~/repo/packages/core
</code></pre></div></div>

<p>Once you run the command, Claude Code updates the working directory, reads the <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> at the new location and appends it to the conversation, then continues the work it was doing. Because the conversation history and every decision made so far are preserved, a follow-up request like “verify that the interface I just changed in the core module works from this service” flows naturally.</p>

<p>Here’s a concrete example. ThakiCloud’s platform workspace bundles seven product repositories, the Go backend, the frontend, GitOps deployment, the multi-cluster mesh, and more, as git submodules. Changing a backend API’s response schema and then checking that the frontend consuming that schema still renders correctly is a routine task in this structure. In the old workflow, you had to close the backend session and open a fresh one in the frontend directory, and then re-explain to that new session exactly what you had just changed and why. With <code class="language-plaintext highlighter-rouge">/cd</code>, the flow never breaks.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Working on a schema change in the backend submodule</span>
<span class="c"># ...</span>

<span class="c"># Move to the frontend that consumes that schema (context and cache preserved)</span>
/cd ../ai-suite/apps/web

<span class="c"># Immediately ask: does this screen reference the field name I just renamed?</span>
</code></pre></div></div>

<p>Right after the move, the frontend directory’s <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> gets appended to the conversation, so that repository’s rules (things like FSD boundaries or TDS token usage) apply immediately. At the same time, the context built up in the backend, namely which field was changed and why, is still there, so you can go straight into verification.</p>

<p>To understand the cache economics, you need to look at the rate table. Below is a summary of Anthropic’s published prompt caching rates.</p>

<table>
  <thead>
    <tr>
      <th>Item</th>
      <th>Rate vs. Standard Input</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Cache read</td>
      <td>0.1x</td>
      <td>Reuse of a cached prefix, a 90 percent discount</td>
    </tr>
    <tr>
      <td>Cache write (5-minute TTL)</td>
      <td>1.25x</td>
      <td>Writing a new prefix into the cache, recovered on the first read</td>
    </tr>
    <tr>
      <td>Cache write (1-hour TTL)</td>
      <td>2.0x</td>
      <td>Applies when <code class="language-plaintext highlighter-rouge">ENABLE_PROMPT_CACHING_1H=1</code> is set</td>
    </tr>
    <tr>
      <td>Uncached input</td>
      <td>1.0x</td>
      <td>Base rate</td>
    </tr>
  </tbody>
</table>

<p>One piece of context worth flagging: Anthropic quietly cut the default cache TTL from 60 minutes to 5 minutes in March 2026. If your next request doesn’t arrive within 5 minutes, the cache expires and you pay the write cost again. If you’re working with long gaps between requests, you might consider enabling the 1-hour option, but the write premium jumps to 2.0x, so it’s a real trade-off to weigh. <code class="language-plaintext highlighter-rouge">/cd</code> is what keeps the cache alive while you continue a session within that TTL window, which makes it more important than ever in this shorter-TTL era.</p>

<h2 id="real-experiment-results">Real Experiment Results</h2>

<p>To be honest, <code class="language-plaintext highlighter-rouge">/cd</code> is an interactive slash command, so it wasn’t possible to spin up an actual session and run an interactive benchmark in the headless environment used to write this post. Rather than fabricate measurements, this section presents a cost model built purely from the published rates. The figures below are not measurements; they are calculations based on documented rates, and that distinction is stated explicitly.</p>

<p>Let’s compare how the two paths bill the cached prefix on the first request right after switching directories. On the restart or <code class="language-plaintext highlighter-rouge">/clear</code> path, the prefix is rewritten to the cache at the write rate (1.25x). On the <code class="language-plaintext highlighter-rouge">/cd</code> path, the same prefix is reused at the read rate (0.1x). Assuming the prefix size is identical in both cases, the ratio of what you pay for the prefix right after the switch is 1.25 divided by 0.1, or 12.5x. In other words, the restart path costs roughly 12.5 times more than the <code class="language-plaintext highlighter-rouge">/cd</code> path for re-billing the prefix.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-results.png" alt="Comparison of cached-prefix cost when switching directories: the restart/re-cache path pays the 1.25x write rate, while the /cd path pays the 0.1x read rate, a roughly 12.5x difference by the documented rates" /></p>

<p>This ratio holds regardless of the prefix’s absolute token count. The absolute savings, however, grow larger as the prefix grows. In large projects it’s common [estimated] for the combined prefix of system prompt, tool definitions, and a hefty <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> to reach tens of thousands of tokens, and in sessions like that, moving between directories several times a day makes the re-caching cost add up fast. <code class="language-plaintext highlighter-rouge">/cd</code> compresses that 12.5x premium per switch down to the read rate.</p>

<p>One more thing worth noting: what <code class="language-plaintext highlighter-rouge">/cd</code> preserves isn’t only cost. The conversation context lost on the restart path is a cost that’s hard to translate into tokens. Having to re-explain the intent behind code you just changed, hypotheses you’d already formed, or approaches you’d already ruled out, costs both human time and additional tokens. <code class="language-plaintext highlighter-rouge">/cd</code> removes that re-explanation cost as well.</p>

<h2 id="implications-for-thakicloud-products">Implications for ThakiCloud Products</h2>

<p>This feature is meaningful from the perspective of both ThakiCloud products.</p>

<p>From the Paxis angle, <code class="language-plaintext highlighter-rouge">/cd</code> addresses session hygiene for coding agents directly. Paxis is ThakiCloud’s Agent-Native Cloud, treating skills, tools, policies, and audit logs as first-class resources and running agents in isolated sandboxes. A coding agent moving across multiple repositories and submodules is a common scenario on Paxis. If every switch restarted the session and re-cached the prefix, a large skill harness and its policy context would get re-billed every time. The approach <code class="language-plaintext highlighter-rouge">/cd</code> takes, preserving the prefix and appending only the directory-specific rules as a message, aligns well with Paxis’s orchestration model, which keeps skill selection and policy gates intact while only the working path changes. The idea of appending context after the fact rather than rewriting the system prompt is the same principle behind managing an always-loaded rule layer with cache stability in mind.</p>

<p>From the ai-platform angle, cache economics is directly multi-tenant serving cost. ThakiCloud’s ai-platform serves multiple customers’ inference workloads on K8s and Kueue-based GPU scheduling. Prompt caching is the key lever for reducing input costs by reusing repeated prefixes, and the principle <code class="language-plaintext highlighter-rouge">/cd</code> demonstrates, appending context after the cached boundary instead of in front of it so the cache never breaks, applies equally to our own serving stack. Designing the prompt structure to minimize cache invalidation points is a direct path to a competitive cost position on serving. The two lenses reinforce each other: lower serving cost (ai-platform) makes agent economics work (Paxis), and cache-preserving agent behavior (Paxis) in turn reduces infrastructure load.</p>

<h2 id="limitations-and-counterarguments">Limitations and Counterarguments</h2>

<p><code class="language-plaintext highlighter-rouge">/cd</code> isn’t a silver bullet. First, cache preservation only matters within the 5-minute TTL. If you step away for a long time after switching directories, the cache expires regardless of whether you used <code class="language-plaintext highlighter-rouge">/cd</code>, and the next request pays the write cost either way. Given the short TTL, <code class="language-plaintext highlighter-rouge">/cd</code>’s savings are largest in a continuous work session and shrink for intermittent work.</p>

<p>Second, appending <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> as a message instead of folding it into the system prompt has a subtle catch. If you edit the original project’s <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> mid-session, that change doesn’t break the cache, but it also doesn’t take effect until you <code class="language-plaintext highlighter-rouge">/clear</code>, <code class="language-plaintext highlighter-rouge">/compact</code>, or restart. In other words, you can end up in a situation where you’ve changed the rules but the session hasn’t picked them up, so you need to deliberately refresh the session after any rule change.</p>

<p>Third, the 12.5x savings ratio is strictly a documented-rate calculation for re-billing the prefix right after a switch. How much you actually feel that savings in the total session cost depends on the prefix’s share of overall cost, conversation length, and how often you switch. Don’t stretch this post’s ratio into “your session costs 12.5x less.” The precise claim is narrower: you don’t have to re-cache the prefix at the moment you switch.</p>

<p>Even so, the conclusion is clear. If your work involves frequently moving between directories in a monorepo or across multiple repositories, <code class="language-plaintext highlighter-rouge">/cd</code> is the cheapest way to protect both your conversation context and your prompt cache at the same time. For any team that operates coding agents with cost in mind, this one line is worth turning into a habit.</p>

<h2 id="sources">Sources</h2>

<ul>
  <li><a href="https://code.claude.com/docs/en/sessions">Manage sessions - Claude Code Docs</a></li>
  <li><a href="https://code.claude.com/docs/en/prompt-caching">How Claude Code uses prompt caching - Claude Code Docs</a></li>
  <li><a href="https://claudcod.com/blog/claude-code-cd-command/">Claude Code /cd: Switch Projects Without Losing Cache</a></li>
  <li><a href="https://x.com/hjguyhan/status/2074414356058763747">Original tweet (retweeted by @delba_oliveira)</a></li>
</ul>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="dev" /><category term="claude-code" /><category term="prompt-caching" /><category term="ai-agent" /><category term="developer-tools" /><category term="cost-optimization" /><summary type="html"><![CDATA[In a monorepo, switching between a library directory and the service that consumes it used to mean restarting your session, and with it, both your conversation context and your prompt cache. The /cd command in Claude Code v2.1.169 moves a running session to a new directory while keeping the cache alive. Using the documented rate difference between cache reads (0.1x) and cache writes (1.25x), this post explains why that one line changes coding agent operating costs, and connects it to ThakiCloud's Paxis coding agent and ai-platform serving cost picture.]]></summary></entry><entry xml:lang="en"><title type="html">An Evaluation That Trusts No Single Number: Building a Sovereign LLM-Judge Service on Binary Decomposition and Deterministic Gates</title><link href="https://thakicloud.github.io/en/research/atomic-binary-judge-eval-service/" rel="alternate" type="text/html" title="An Evaluation That Trusts No Single Number: Building a Sovereign LLM-Judge Service on Binary Decomposition and Deterministic Gates" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/en/research/atomic-binary-judge-eval-service</id><content type="html" xml:base="https://thakicloud.github.io/en/research/atomic-binary-judge-eval-service/"><![CDATA[<h2 id="who-should-read-this">Who should read this</h2>

<p>This post is for engineers who run automated pipelines that grade LLM outputs, or who want to offer model evaluation as a service on a GPU cluster shared by multiple internal teams. It covers how fragile the approach of “asking an LLM to give a score from 1 to 10” really is, and what must be left to the model versus taken over by code to remove that fragility. It is especially relevant for organizations in regulated industries or government agencies that cannot send data outside their walls and therefore cannot rely on a frontier API judge.</p>

<h2 id="the-problem-measuring-quality-with-a-single-number-is-already-breaking-down">The problem: measuring quality with a single number is already breaking down</h2>

<p>As the pace of model development and safety review has outstripped the pace at which humans can grade outputs by hand, LLM-as-a-judge, where an LLM evaluates the output of another LLM, has become essentially standard practice. But this practice rests on the assumption that a scalar value produced by one frozen model tracks the score a human would assign, and research accumulated through 2026 has dismantled that assumption piece by piece. Judge models flip their verdicts based on superficial cues such as prompt wording or where an answer sits in the input, they compress toward the middle of the grading scale and squash exactly the extreme cases that should be caught, and they are overconfident in their own verdicts while that confidence remains uncalibrated. When a red team perturbs the input even slightly, the verdict becomes no better than a coin flip. Automated bias detection tools and diagnostics based on item response theory confirm this instability at scale and in quantitative terms.</p>

<p>The research community’s response to this problem falls broadly into two camps. One camp asks the model interpretable yes-or-no questions instead of a score; work such as BINEVAL decomposes evaluation criteria into binary questions and matches or exceeds the performance of scalar or pairwise-comparison judges, while also revealing exactly which sub-criterion failed. The other camp adds structure around the judge itself, deploying juries of multiple judges, debate, and verification units to increase the “compute the judge spends” and thereby raise robustness, or using selective evaluation cascades that route only uncertain cases forward to guarantee human-level agreement.</p>

<p>The trouble is that both camps are almost always validated only on offline benchmarks run on a single machine. The reality faced by organizations for which data sovereignty matters, such as hospitals, banks, and government research institutes, differs on three points. Because data cannot leave the facility, evaluation must run on a shared GPU cluster the organization owns rather than on a frontier API; because multiple teams compete for the same accelerators, the evaluation service must respect per-tenant cost and tail-latency budgets; and because compliance officers ask not “what is the score” but “why is it that score,” an opaque single scalar cannot answer that question.</p>

<h2 id="core-contribution-the-four-disciplines-abj-gate-binds-together">Core contribution: the four disciplines ABJ-Gate binds together</h2>

<p>Building on these three real-world constraints, ThakiCloud AI Research proposes <strong>ABJ-Gate</strong>, an architecture that binds the two research streams into one. Its core idea is that each evaluation criterion is broken down into an atomic binary question that a small on-prem worker model answers, while aggregating those answers, normalizing their format, calibrating them, and keeping an audit log is left entirely to deterministic code rather than to a model. Any item that falls on a contested boundary or triggers a suspicion signal is always sent to an odd number of independent skeptic workers instructed to “try to refute this” and put to a vote; the verdict survives only when the majority fails to refute it. And the budget for every one of these LLM calls is allocated by a Kueue/GPU-based scheduler within per-tenant cost and tail-latency caps.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig1_cost_frontier.png" alt="Sampling rate versus relative cost under the analytical cost model (Eq. 8)" />
<em>A computed result from the analytical model assuming 5 binary criteria, a 10% flag rate, and 3 skeptics. Running every item through full binary judgment (k=1) pushes cost to roughly 5.3x that of a scalar judge, but conformal calibration that reduces escalations and lowers the sampling rate k to 0.2 brings cost down to roughly 1.06x the scalar judge’s cost while preserving interpretability and calibration. This is a computation from Eq. 8, not a measured benchmark.</em></p>

<p>This design is also the promotion, into a formal product surface shared by multiple tenants, of two disciplines the company already enforces at all times in its internal harness: the principle that “code owns format, the model owns content,” and the principle that fanned-out verification results must always be closed with an adversarial vote. No matter how plausibly a worker model self-reports its own answer length, count, or an “overall score out of however many points,” that value is discarded and recomputed by code, so minor wobbles on the worker side cannot contaminate the final result.</p>

<p>The promises this architecture actually has to keep are formalized and proven as three properties. First, reproducibility: given the same set of binary answers, the aggregate score always produces the same value regardless of random seed or request order. Second, a risk-control guarantee: calibrating how often the cheap first-stage judgment and the expensive second-stage verification disagree, using conformal risk control, bounds that disagreement rate below a target level distribution-free, no matter what distribution the items are drawn from. Third, a property whereby, if an admission policy keeps each tenant’s utilization below a certain threshold, queueing theory bounds that tenant’s evaluation latency to a finite value.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig2_latency_bound.png" alt="Conceptual diagram of tenant utilization versus expected queueing delay (Prop. 3)" />
<em>An illustrative conceptual curve showing how delay spikes as utilization approaches 1 in an M/G/c queueing model. It visualizes the argument of Proposition 3, that admission control can manage tail latency by tuning the sampling rate to keep utilization under a target threshold, and is not measured latency data.</em></p>

<p>The paper also spells out quantitatively when binary decomposition actually helps. When each criterion can be answered by a human more reliably than a scalar score and the criteria are weakly correlated so that they carry independent information from one another, binary decomposition combined with majority-vote verification is shown to produce strictly lower variance than a scalar judge. Conversely, the paper is equally clear that if the criteria are entangled with one another, or the binary questions themselves are easy to game, decomposition does not help and can even add bias.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig3_variance_reduction.png" alt="Conditions under which criterion decomposition reduces variance" />
<em>A conceptual diagram visualizing the analytical argument in Section 4.4 of the paper. The variance of the aggregate score decreases roughly in proportion to the per-criterion error variance divided by the number of effectively independent criteria, shown as a relative reduction trend against a baseline of the scalar judge at 1x. These are not experimentally measured figures.</em></p>

<h2 id="what-it-leaves-for-the-company-society-and-science">What it leaves for the company, society, and science</h2>

<p>From the company’s perspective, this paper consolidates a binary-decomposed judge running on the company’s own GPU scheduling infrastructure, a deterministic aggregation gate, and a sampling scheduler that satisfies per-tenant cost and latency caps into one complete design. It elevates an internal discipline that was already in operation into a product surface shared across multiple tenants. Socially, it opens a path for organizations in regulated industries, who could not use frontier API evaluation services because their data cannot leave the premises, to run pre-deployment safety and quality verification on their own hardware continuously, reproducibly, and auditably. That lowers the barrier to entry for trustworthy AI deployment. Scientifically, it establishes a framework for quantifying the relationship between judge reliability and cost when the idea of binary decomposition is combined with calibration, adversarial verification votes, deterministic aggregation, and cost-bounded sampling, and it presents, alongside that framework, a pre-registered protocol for validating that relationship empirically against literature from the past six months.</p>

<h2 id="limitations">Limitations</h2>

<p>The paper is explicit about its own limitations. This work presents only the architecture, three theoretical proofs, an analytical cost model, and a pre-registered protocol for validating that frontier against human labels; it does not contain measured accuracy figures. The authors state plainly that reporting numbers without having actually run the protocol would itself be fabrication, and they have deliberately left the figures blank. Beyond that, the paper explicitly names as limitations the fact that the wording of the binary questions themselves can be gamed, that the calibration function can drift under new model families or evolving adversarial attacks, that a heuristic that only checks whether a link is alive misses more sophisticated failures such as soft 404s, and that the variance-reduction argument itself breaks down when criteria are entangled with one another. It also acknowledges that on-prem small worker models inherently perform below frontier-grade judges, so that in exchange for gaining interpretability, calibration, reproducibility, and cost bounds, the system gives up some accuracy as a standalone judge.</p>

<p>Full paper details are available on Hugging Face: <a href="https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service">https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service</a></p>

<h2 id="related-slides">Related slides</h2>

<p>These slides summarize the body of this post using NotebookLM (<code class="language-plaintext highlighter-rouge">neo_swiss</code> style).</p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-01.png" alt="atomic-binary-judge-eval-service slide 1" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-02.png" alt="atomic-binary-judge-eval-service slide 2" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-03.png" alt="atomic-binary-judge-eval-service slide 3" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-04.png" alt="atomic-binary-judge-eval-service slide 4" /></p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="research" /><category term="research" /><category term="llm-as-a-judge" /><category term="eval-as-a-service" /><category term="model-evaluation" /><category term="conformal-prediction" /><category term="multi-tenancy" /><category term="kueue" /><category term="on-prem-llm" /><summary type="html"><![CDATA[Using an LLM as a grader, the practice known as LLM-as-a-judge, is now the default in model development, but the evidence that piled up through 2026 shows that a scalar judge producing a single score is fragile to prompt wording and answer position, drifts toward the middle of the scale, and collapses to coin-flip reliability against adversarial inputs. On-prem multi-tenant clusters in hospitals, banks, and government agencies, where data can never leave the facility, add cost caps, latency caps, and auditability on top of that fragility. ThakiCloud AI Research introduces ABJ-Gate, an architecture that decomposes evaluation criteria into atomic binary questions and hands aggregation, verification, and scheduling entirely to code.]]></summary></entry><entry xml:lang="ko"><title type="html">Claude Code /cd - 세션을 재시작하지 않고 디렉터리를 옮기며 프롬프트 캐시를 지키는 법</title><link href="https://thakicloud.github.io/ko/dev/claude-code-cd-prompt-cache/" rel="alternate" type="text/html" title="Claude Code /cd - 세션을 재시작하지 않고 디렉터리를 옮기며 프롬프트 캐시를 지키는 법" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/ko/dev/claude-code-cd-prompt-cache</id><content type="html" xml:base="https://thakicloud.github.io/ko/dev/claude-code-cd-prompt-cache/"><![CDATA[<p>코딩 에이전트를 오래 붙잡고 일하다 보면 디렉터리를 옮겨야 하는 순간이 반드시 옵니다. 공유 라이브러리에서 코어 모듈을 고친 다음, 그 모듈을 쓰는 서비스로 넘어가 통합을 확인해야 하는 모노레포 작업이 대표적입니다. 지금까지는 이럴 때 세션을 닫고 새 디렉터리에서 다시 열거나 <code class="language-plaintext highlighter-rouge">/clear</code>로 맥락을 비워야 했습니다. 그러면 여태 쌓은 대화 맥락이 사라지는 것은 물론이고, 눈에 잘 보이지 않는 비용 하나가 더 발생합니다. 바로 프롬프트 캐시가 통째로 무효화되어 다음 요청이 캐시 쓰기 요율로 다시 청구되는 것입니다. Claude Code v2.1.169에 조용히 들어온 <code class="language-plaintext highlighter-rouge">/cd</code> 명령은 이 두 손실을 동시에 막습니다. 이 글은 그 한 줄이 왜 단순한 편의 기능이 아니라 코딩 에이전트 운영 비용의 문제인지, 문서에 공개된 요율을 근거로 짚습니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-hero.png" alt="연속된 데이터 스트림이 두 갈래로 갈라져, 한쪽은 블록을 값비싸게 다시 쌓고 다른 쪽은 격자를 그대로 흘려보내는 추상 개념도" /></p>

<h2 id="개요">개요</h2>

<p><code class="language-plaintext highlighter-rouge">/cd &lt;경로&gt;</code>는 실행 중인 Claude Code 세션을 다른 작업 디렉터리로 옮깁니다. 세션을 재시작하지 않으므로 대화 기록, 모델 선택, 권한 설정이 모두 새 디렉터리로 그대로 넘어갑니다. 여기까지는 흔한 편의 기능처럼 들립니다. 진짜 핵심은 그다음입니다. <code class="language-plaintext highlighter-rouge">/cd</code>는 프롬프트 캐시를 깨지 않습니다. 디렉터리를 옮긴 직후에 보내는 메시지가 캐시 쓰기 가격이 아니라 캐시 읽기 가격으로 청구됩니다.</p>

<p>이 차이가 사소하지 않은 이유는 캐시 요율 자체에 있습니다. Anthropic이 공개한 프롬프트 캐싱 요율에서 캐시 읽기는 표준 입력 단가의 약 10퍼센트, 즉 0.1배입니다. 반대로 캐시에 새로 쓰는 것은 기본 입력 단가의 1.25배가 붙습니다. 세션을 재시작하면 시스템 프롬프트, 도구 정의, 그리고 프로젝트의 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>가 모두 새 캐시로 다시 쓰여야 합니다. 큰 프로젝트일수록 이 프리픽스는 수만 토큰에 달합니다. <code class="language-plaintext highlighter-rouge">/cd</code>는 이 프리픽스를 다시 쓰지 않고 그대로 읽어 재사용합니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-slide-02.png" alt="디렉터리 전환의 숨은 비용: 프리픽스 재기록이라는 1.25배 프리미엄과 대화 맥락 손실" /></p>

<p>ThakiCloud는 멀티테넌트 환경에서 여러 고객의 에이전트와 배치 작업을 같은 인프라 위에서 돌립니다. 이런 환경에서 토큰 경제성은 곧 서비스 원가입니다. 코딩 에이전트가 디렉터리를 옮길 때마다 프리픽스를 다시 캐싱한다면, 그 비용은 세션 수와 전환 횟수에 비례해 누적됩니다. <code class="language-plaintext highlighter-rouge">/cd</code>처럼 캐시를 보존하는 동작 하나가 대규모 운영에서는 무시할 수 없는 절감으로 이어집니다. 그래서 이 기능은 “편한 단축키”가 아니라 “비용 위생”의 문제로 보는 편이 정확합니다.</p>

<h2 id="이-기술은-무엇인가">이 기술은 무엇인가</h2>

<p>프롬프트 캐시가 어떻게 작동하는지 먼저 짚어야 <code class="language-plaintext highlighter-rouge">/cd</code>의 가치가 보입니다. Claude Code는 매 턴마다 시스템 프롬프트, 도구 정의, <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 자동으로 캐싱합니다. 별도 설정이 필요 없습니다. 이 캐시된 프리픽스가 대화 앞부분을 차지하고, 그 뒤에 매번 새로운 메시지가 붙습니다. 캐시가 살아 있으면 이 프리픽스는 읽기 요율로만 청구됩니다. 캐시가 깨지면 프리픽스 전체를 다시 써야 합니다.</p>

<p>세션을 재시작하거나 <code class="language-plaintext highlighter-rouge">/clear</code>로 맥락을 비우면 캐시가 무효화됩니다. 그런데 디렉터리를 옮기는 작업의 함정은, 새 디렉터리에 다른 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>가 있다는 점입니다. 상식적으로는 시스템 프롬프트에 들어가는 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>가 바뀌면 캐시가 깨져야 할 것 같습니다. <code class="language-plaintext highlighter-rouge">/cd</code>의 영리한 부분이 여기입니다. 목적지 디렉터리의 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 시스템 프롬프트에 다시 써 넣는 대신, 대화의 다음 메시지로 덧붙입니다. 시스템 프롬프트를 다시 쓰지 않으니 캐시된 프리픽스가 그대로 유지되고, 새 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>는 그저 뒤에 붙는 사용자 메시지 하나로 처리됩니다. 이것이 캐시를 지키면서도 새 디렉터리의 규칙을 반영하는 방법입니다.</p>

<p>아래 도표는 디렉터리를 옮길 때 두 경로가 캐시에 어떻게 다르게 작동하는지를 보여 줍니다.</p>

<pre><code class="language-mermaid">flowchart TB
    A["디렉터리 A에서&lt;br/&gt;세션 진행 중&lt;br/&gt;(프리픽스 캐시 활성)"] --&gt; B{"디렉터리 B로&lt;br/&gt;이동 필요"}
    B --&gt;|"재시작 또는 /clear"| C["시스템 프롬프트·도구·&lt;br/&gt;CLAUDE.md 캐시 무효화"]
    C --&gt; D["프리픽스 전체를&lt;br/&gt;다시 캐시 쓰기&lt;br/&gt;(1.25배 요율)"]
    D --&gt; E["대화 맥락 손실"]
    B --&gt;|"/cd 경로"| F["시스템 프롬프트 유지&lt;br/&gt;새 CLAUDE.md는&lt;br/&gt;메시지로 덧붙임"]
    F --&gt; G["프리픽스 캐시 읽기&lt;br/&gt;(0.1배 요율)"]
    G --&gt; H["대화·모델·권한&lt;br/&gt;그대로 유지"]
</code></pre>

<p>이 그림의 핵심은 오른쪽 경로가 시스템 프롬프트를 건드리지 않는다는 점입니다. 왼쪽 경로는 프리픽스를 다시 쓰면서 그동안 쌓은 대화까지 함께 버립니다. 같은 목적지에 도착하지만 지불하는 비용이 완전히 다릅니다.</p>

<p>왜 뒤에 붙이면 캐시가 살아남는지는 프롬프트 캐싱이 프리픽스 단위로 동작하기 때문입니다. 캐시는 대화의 앞부분, 즉 접두부가 이전과 동일한 만큼을 재사용합니다. 접두부의 한 글자라도 바뀌면 그 지점부터 뒤는 전부 다시 계산해야 합니다. 그래서 자주 바뀌는 내용을 앞에 두면 캐시 적중률이 떨어지고, 안정적인 내용을 앞에 두고 변하는 내용을 뒤에 붙이면 적중률이 올라갑니다. <code class="language-plaintext highlighter-rouge">/cd</code>가 새 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 시스템 프롬프트가 아니라 대화 끝에 메시지로 덧붙이는 것은 정확히 이 원리를 지키는 설계입니다. 캐시된 접두부는 손대지 않고, 변화는 캐시 경계 바깥에서 흡수합니다.</p>

<h2 id="설치-및-통합">설치 및 통합</h2>

<p><code class="language-plaintext highlighter-rouge">/cd</code>는 별도 설치가 필요 없습니다. Claude Code v2.1.169 이상이면 바로 쓸 수 있습니다. 이 명령은 2026년 6월 8일에 릴리스되었습니다. 사용법은 단순합니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-slide-03.png" alt="/cd 명령은 v2.1.169에서 도입되었으며, 실행 중인 세션을 닫지 않고 작업 디렉터리만 갱신하면서 캐시를 읽기 가격으로 유지합니다" /></p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># 세션 안에서 다른 디렉터리로 이동</span>
/cd ../consuming-service

<span class="c"># 절대 경로도 가능</span>
/cd /Users/me/repo/apps/web

<span class="c"># 홈 기준 경로</span>
/cd ~/repo/packages/core
</code></pre></div></div>

<p>명령을 실행하면 Claude Code는 작업 디렉터리를 갱신하고, 새 위치의 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 읽어 대화에 덧붙인 뒤, 하던 작업을 이어 갑니다. 대화 기록과 지금까지 내린 결정이 그대로 남아 있으므로, “방금 코어 모듈에서 고친 인터페이스를 이 서비스에서 검증해 줘” 같은 요청이 자연스럽게 이어집니다.</p>

<p>구체적인 예를 들어 보겠습니다. ThakiCloud의 플랫폼 워크스페이스는 Go 백엔드, 프론트엔드, GitOps 배포, 멀티클러스터 메시 등 일곱 개의 제품 리포지터리를 git 서브모듈로 묶어 둡니다. 백엔드 API의 응답 스키마를 바꾼 뒤 그 스키마를 소비하는 프론트엔드에서 화면이 제대로 나오는지 확인하는 작업은 이 구조에서 일상입니다. 예전 방식이라면 백엔드 세션을 닫고 프론트엔드 디렉터리에서 새 세션을 열어야 했고, 그러면 방금 무엇을 왜 바꿨는지를 새 세션에 다시 설명해야 했습니다. <code class="language-plaintext highlighter-rouge">/cd</code>를 쓰면 흐름이 끊기지 않습니다.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># 백엔드 서브모듈에서 스키마 수정 작업 진행 중</span>
<span class="c"># ...</span>

<span class="c"># 그 스키마를 소비하는 프론트엔드로 이동 (맥락·캐시 유지)</span>
/cd ../ai-suite/apps/web

<span class="c"># 이어서 바로 물어봄: 방금 바꾼 필드명을 이 화면이 참조하는지 확인</span>
</code></pre></div></div>

<p>이동 직후 프론트엔드 디렉터리의 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>가 대화에 덧붙으므로, 그 리포지터리의 규칙(FSD 경계나 TDS 토큰 사용 같은)이 즉시 반영됩니다. 동시에 백엔드에서 쌓은 맥락, 즉 어떤 필드를 왜 바꿨는지가 그대로 살아 있어 곧장 검증으로 넘어갈 수 있습니다.</p>

<p>캐시 경제성을 이해하려면 요율 표를 봐야 합니다. 아래는 Anthropic이 공개한 프롬프트 캐싱 요율을 정리한 것입니다.</p>

<table>
  <thead>
    <tr>
      <th>항목</th>
      <th>표준 입력 대비 요율</th>
      <th>설명</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>캐시 읽기</td>
      <td>0.1배</td>
      <td>캐시된 프리픽스 재사용, 90퍼센트 할인</td>
    </tr>
    <tr>
      <td>캐시 쓰기(5분 TTL)</td>
      <td>1.25배</td>
      <td>새 프리픽스를 캐시에 기록, 첫 읽기가 회수</td>
    </tr>
    <tr>
      <td>캐시 쓰기(1시간 TTL)</td>
      <td>2.0배</td>
      <td><code class="language-plaintext highlighter-rouge">ENABLE_PROMPT_CACHING_1H=1</code> 설정 시</td>
    </tr>
    <tr>
      <td>캐시 미사용 입력</td>
      <td>1.0배</td>
      <td>기준 단가</td>
    </tr>
  </tbody>
</table>

<p>한 가지 주의할 맥락이 있습니다. Anthropic은 2026년 3월에 기본 캐시 TTL을 60분에서 5분으로 조용히 줄였습니다. 5분 안에 다음 요청이 없으면 캐시가 만료되어 다시 쓰기 비용을 냅니다. 긴 간격으로 작업한다면 1시간 옵션을 켜는 것을 고려할 수 있지만, 쓰기 프리미엄이 2.0배로 올라가므로 트레이드오프를 따져야 합니다. <code class="language-plaintext highlighter-rouge">/cd</code>는 이 TTL 안에서 세션을 이어 갈 때 캐시를 살려 두는 역할이라, 짧은 TTL 시대에 오히려 더 중요해졌습니다.</p>

<h2 id="실제-실험-결과">실제 실험 결과</h2>

<p>정직하게 밝히자면, <code class="language-plaintext highlighter-rouge">/cd</code>는 대화형 슬래시 명령이라 이 글을 작성한 헤드리스 환경에서는 실제 세션을 띄워 상호작용 벤치마크를 돌릴 수 없었습니다. 그래서 측정값을 지어내는 대신, 공개된 요율만으로 계산할 수 있는 비용 모델을 제시합니다. 아래 수치는 측정값이 아니라 문서 기준 요율 계산이며, 그 사실을 분명히 표시합니다.</p>

<p>디렉터리를 옮긴 직후 첫 요청에서 캐시된 프리픽스가 어떻게 청구되는지 두 경로를 비교해 보겠습니다. 재시작이나 <code class="language-plaintext highlighter-rouge">/clear</code> 경로에서는 프리픽스가 캐시 쓰기(1.25배)로 다시 기록됩니다. <code class="language-plaintext highlighter-rouge">/cd</code> 경로에서는 같은 프리픽스가 캐시 읽기(0.1배)로 재사용됩니다. 프리픽스 크기가 같다고 놓으면, 전환 직후 프리픽스에 대해 지불하는 비용의 비율은 1.25 나누기 0.1, 즉 12.5배입니다. 다시 말해 재시작 경로는 <code class="language-plaintext highlighter-rouge">/cd</code> 경로보다 프리픽스 재청구에서 약 12.5배 비쌉니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-results.png" alt="디렉터리 전환 시 캐시된 프리픽스 비용 비교: 재시작/재캐시 경로는 쓰기 1.25배, /cd 경로는 읽기 0.1배로, 문서 기준 요율상 약 12.5배 차이가 납니다" /></p>

<p>이 비율은 프리픽스의 절대 토큰 수와 무관하게 성립합니다. 다만 절대 절감액은 프리픽스가 클수록 커집니다. 대규모 프로젝트에서 시스템 프롬프트와 도구 정의, 그리고 두툼한 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 합친 프리픽스가 수만 토큰에 이르는 경우가 흔한데[추정], 이런 세션에서 하루에 디렉터리를 여러 번 오가면 재캐시 비용이 빠르게 쌓입니다. <code class="language-plaintext highlighter-rouge">/cd</code>는 그 전환마다 붙는 12.5배 프리미엄을 읽기 요율로 눌러 줍니다.</p>

<p>한 가지 더 짚을 점은, <code class="language-plaintext highlighter-rouge">/cd</code>가 지키는 것이 비용만이 아니라는 사실입니다. 재시작 경로에서 잃는 대화 맥락은 토큰으로 환산하기 어려운 비용입니다. 방금 고친 코드의 의도, 앞서 세운 가설, 이미 배제한 접근을 다시 설명해야 한다면 사람의 시간과 추가 토큰이 모두 듭니다. <code class="language-plaintext highlighter-rouge">/cd</code>는 이 재설명 비용까지 함께 제거합니다.</p>

<h2 id="thakicloud-제품-적용-시사점">ThakiCloud 제품 적용 시사점</h2>

<p>이 기능은 ThakiCloud의 두 제품 관점에서 모두 의미가 있습니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-slide-07.png" alt="Paxis(에이전트 경제성)와 ai-platform(낮은 서빙 원가)이 캐시 보존 설계를 통해 서로를 보완하는 구조" /></p>

<p>Paxis 관점에서 보면 <code class="language-plaintext highlighter-rouge">/cd</code>는 코딩 에이전트의 세션 위생 문제를 정확히 건드립니다. Paxis는 ThakiCloud의 Agent-Native Cloud로, 스킬과 도구, 정책, 감사 로그를 일급 리소스로 다루며 격리된 샌드박스에서 에이전트를 실행합니다. 코딩 에이전트가 여러 리포지터리와 서브모듈을 오가며 작업하는 것은 Paxis에서 흔한 시나리오입니다. 이때 전환마다 세션을 재시작해 프리픽스를 다시 캐싱한다면, 큰 스킬 하니스와 정책 컨텍스트를 매번 재청구하게 됩니다. <code class="language-plaintext highlighter-rouge">/cd</code>처럼 프리픽스를 보존하며 디렉터리 규칙만 메시지로 덧붙이는 방식은, 스킬 선택과 정책 게이트를 유지한 채로 작업 경로만 바꾸는 Paxis의 오케스트레이션 모델과 잘 맞습니다. 시스템 프롬프트를 다시 쓰지 않고 뒤에 컨텍스트를 덧붙인다는 발상 자체가, 상시 로딩되는 규칙 레이어를 캐시 안정성 관점에서 관리하는 원칙과 동일합니다.</p>

<p>ai-platform 관점에서는 캐시 경제성이 곧 멀티테넌트 서빙 원가입니다. ThakiCloud의 ai-platform은 K8s와 Kueue 기반 GPU 스케줄링 위에서 여러 고객의 추론 워크로드를 서빙합니다. 프롬프트 캐싱은 반복되는 프리픽스를 재사용해 입력 비용을 줄이는 핵심 레버인데, <code class="language-plaintext highlighter-rouge">/cd</code>가 보여 주는 원리, 즉 캐시를 깨지 않도록 컨텍스트를 앞이 아니라 뒤에 추가한다는 설계는 자체 서빙 스택에서도 그대로 적용됩니다. 캐시 무효화 지점을 최소화하도록 프롬프트 구조를 설계하면, 낮은 서빙 비용에서 경쟁력을 얻습니다. 두 렌즈는 서로를 보완합니다. 낮은 서빙 비용(ai-platform)이 에이전트 경제성(Paxis)을 만들고, 캐시를 지키는 에이전트 동작(Paxis)이 다시 인프라 부하를 낮춥니다.</p>

<h2 id="한계-및-반론">한계 및 반론</h2>

<p><code class="language-plaintext highlighter-rouge">/cd</code>가 만능은 아닙니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-slide-08.png" alt="세 가지 제약: 5분 TTL, 규칙 불변성(세션 중 CLAUDE.md 편집은 갱신 전까지 미반영), 절감 비율의 한정된 범위" /></p>

<p>먼저 캐시 보존은 5분 TTL 안에서만 의미가 있습니다. 디렉터리를 옮긴 뒤 오래 손을 놓으면 캐시가 만료되어, <code class="language-plaintext highlighter-rouge">/cd</code>를 썼든 안 썼든 다음 요청은 쓰기 비용을 냅니다. 짧은 TTL을 감안하면 <code class="language-plaintext highlighter-rouge">/cd</code>의 절감은 연속 작업 흐름에서 가장 크고, 간헐적 작업에서는 효과가 줄어듭니다.</p>

<p>둘째로, <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 시스템 프롬프트가 아니라 메시지로 덧붙이는 방식에는 미묘한 함정이 있습니다. 세션 도중에 원본 프로젝트의 <code class="language-plaintext highlighter-rouge">CLAUDE.md</code>를 편집해도 그 변경은 캐시를 깨지 않는 대신, <code class="language-plaintext highlighter-rouge">/clear</code>나 <code class="language-plaintext highlighter-rouge">/compact</code> 또는 재시작 전까지는 적용되지 않습니다. 즉 규칙을 바꿨는데 세션이 이를 반영하지 않는 상황이 생길 수 있으므로, 규칙 변경 후에는 의도적으로 세션을 갱신해야 합니다.</p>

<p>셋째로, 캐시 절감 비율 12.5배는 어디까지나 전환 직후 프리픽스 재청구에 대한 문서 기준 계산입니다. 실제 세션 전체 비용에서 프리픽스가 차지하는 비중, 대화 길이, 전환 빈도에 따라 체감 절감폭은 달라집니다. 이 글의 비율을 “세션 비용이 12.5배 싸진다”로 확대 해석하면 안 됩니다. 정확히는 “전환 시점에 프리픽스를 다시 캐싱하지 않아도 된다”는 절감입니다.</p>

<p>그럼에도 결론은 분명합니다. 모노레포나 다중 리포지터리 작업에서 디렉터리를 오갈 일이 잦다면, <code class="language-plaintext highlighter-rouge">/cd</code>는 대화 맥락과 프롬프트 캐시를 동시에 지키는 가장 값싼 방법입니다. 코딩 에이전트를 비용까지 고려해 운영하는 팀이라면, 이 한 줄을 습관으로 만들 이유가 충분합니다.</p>

<p><img src="/assets/images/claude-code-cd-prompt-cache-slide-09.png" alt="/cd는 편의 단축키가 아니라 코딩 에이전트의 대화 맥락과 캐시 경제성을 지키는 비용 위생 도구입니다" /></p>

<h2 id="출처">출처</h2>

<ul>
  <li><a href="https://code.claude.com/docs/en/sessions">Manage sessions - Claude Code Docs</a></li>
  <li><a href="https://code.claude.com/docs/en/prompt-caching">How Claude Code uses prompt caching - Claude Code Docs</a></li>
  <li><a href="https://claudcod.com/blog/claude-code-cd-command/">Claude Code /cd: Switch Projects Without Losing Cache</a></li>
  <li><a href="https://x.com/hjguyhan/status/2074414356058763747">원 트윗(@delba_oliveira 리트윗)</a></li>
</ul>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="dev" /><category term="claude-code" /><category term="prompt-caching" /><category term="ai-agent" /><category term="developer-tools" /><category term="cost-optimization" /><summary type="html"><![CDATA[모노레포에서 라이브러리 디렉터리와 소비 서비스 디렉터리를 오갈 때, 세션을 재시작하면 대화 맥락도 프롬프트 캐시도 함께 날아갑니다. Claude Code v2.1.169에 들어온 /cd 명령은 실행 중인 세션을 다른 디렉터리로 옮기면서 캐시를 그대로 유지합니다. 캐시 읽기(0.1배)와 쓰기(1.25배) 요율 차이를 근거로 왜 이 한 줄이 코딩 에이전트 운영 비용을 크게 바꾸는지 짚고, ThakiCloud의 Paxis 코딩 에이전트와 ai-platform 서빙 비용 관점으로 연결합니다.]]></summary></entry><entry xml:lang="ko"><title type="html">숫자 하나를 믿지 않는 평가: 이진 분해와 결정론 게이트로 짓는 주권형 LLM 심판 서비스</title><link href="https://thakicloud.github.io/ko/research/atomic-binary-judge-eval-service/" rel="alternate" type="text/html" title="숫자 하나를 믿지 않는 평가: 이진 분해와 결정론 게이트로 짓는 주권형 LLM 심판 서비스" /><published>2026-07-07T00:00:00+09:00</published><updated>2026-07-07T00:00:00+09:00</updated><id>https://thakicloud.github.io/ko/research/atomic-binary-judge-eval-service</id><content type="html" xml:base="https://thakicloud.github.io/ko/research/atomic-binary-judge-eval-service/"><![CDATA[<h2 id="이-글을-누가-읽으면-좋은가">이 글을 누가 읽으면 좋은가</h2>

<p>이 글은 LLM 출력을 자동으로 채점하는 평가 파이프라인을 운영하거나, 사내 여러 팀이 공유하는 GPU 클러스터 위에서 모델 평가를 서비스 형태로 제공하려는 엔지니어를 위해 씁니다. “LLM에게 1점에서 10점 사이 점수를 매기게 한다”는 방식이 얼마나 취약한지, 그리고 그 취약함을 없애려면 무엇을 모델에게 맡기고 무엇을 코드가 가져와야 하는지를 다룹니다. 규제 산업이나 정부기관처럼 데이터를 외부로 보낼 수 없어 프론티어 API 심판을 쓸 수 없는 조직이라면 특히 관련이 깊습니다.</p>

<h2 id="문제의식-숫자-하나로-품질을-재는-방식은-이미-무너지고-있다">문제의식: 숫자 하나로 품질을 재는 방식은 이미 무너지고 있다</h2>

<p>모델 개발과 안전 심사의 속도가 사람이 일일이 채점하는 속도를 훨씬 앞지르면서, LLM 스스로가 다른 LLM의 출력을 평가하는 LLM-as-a-judge는 사실상 기본 관행이 되었습니다. 그런데 이 관행은 얼어붙은 하나의 모델이 내놓는 스칼라 값이 사람이 매길 점수를 그대로 따라간다는 가정 위에 서 있고, 2026년 들어 쌓인 연구는 이 가정을 하나씩 무너뜨렸습니다. 심판 모델은 프롬프트 문구나 답안이 놓인 위치 같은 지엽적인 단서에 판정을 뒤집고, 채점 척도의 양 끝을 눌러 중간값으로 몰아가면서 정작 걸러내야 할 극단적인 사례를 뭉개 버립니다. 자신의 판정에 과도하게 확신하면서도 그 확신은 교정되어 있지 않고, 레드팀이 입력을 살짝 비틀면 판정은 동전 던지기와 다를 바 없어집니다. 자동화된 편향 탐지 도구와 문항반응이론 기반 진단은 이런 불안정성을 대규모로, 그리고 정량적으로 확인시켜 줍니다.</p>

<p>이 문제에 대한 연구 커뮤니티의 응답은 크게 두 갈래로 나뉩니다. 하나는 모델에게 점수를 묻는 대신 해석 가능한 예/아니오 질문을 묻는 방식으로, BINEVAL 같은 연구가 평가 기준을 이진 질문들로 분해해 스칼라 심판이나 쌍대비교 심판과 맞먹거나 그 이상의 성능을 내면서 어떤 하위 기준이 실패했는지까지 드러냅니다. 다른 갈래는 심판 주변에 구조를 더하는 방식으로, 여러 심판의 배심원단, 토론, 검증 유닛을 동원해 “심판이 쓰는 연산량” 자체를 늘려 견고함을 높이거나, 불확실한 사례만 골라 사람 수준의 합의를 보장받는 선택적 평가 계단식 구조를 씁니다.</p>

<p>문제는 이 두 갈래 응답이 거의 언제나 단일 머신 위의 오프라인 벤치마크로만 검증된다는 점입니다. 병원, 은행, 정부 연구소처럼 데이터 주권이 중요한 조직이 실제로 맞닥뜨리는 현실은 세 가지 지점에서 다릅니다. 데이터가 시설 밖으로 나갈 수 없으므로 평가는 프론티어 API가 아니라 조직 소유의 공유 GPU 클러스터에서 돌아가야 하고, 여러 팀이 같은 가속기를 두고 경쟁하므로 평가 서비스는 테넌트마다 비용과 꼬리 지연 예산을 지켜야 하며, 규제 담당자는 “몇 점인가”가 아니라 “왜 그 점수인가”를 묻는데 불투명한 스칼라 하나로는 그 질문에 답할 수 없습니다.</p>

<h2 id="핵심-기여-abj-gate가-묶어내는-네-가지-규율">핵심 기여: ABJ-Gate가 묶어내는 네 가지 규율</h2>

<p>ThakiCloud AI Research는 이 세 가지 현실 조건 위에서 두 연구 흐름을 하나로 묶은 아키텍처 <strong>ABJ-Gate</strong>를 제안합니다. 핵심은 평가 기준마다 원자적인 이진 질문으로 쪼개어 소형 온프렘 워커 모델이 답하게 하고, 그 답을 집계하고 형식을 정규화하고 교정하고 감사 기록을 남기는 일은 전부 모델이 아니라 결정론적 코드가 맡는다는 점입니다. 판정이 갈리는 경계 지점에 놓인 항목이나 의심스러운 정황이 감지된 항목은 반드시 홀수 개의 독립된 회의론자 워커가 “반박해 보라”는 지시를 받고 표결에 부쳐지며, 다수가 반박에 실패했을 때만 판정이 살아남습니다. 그리고 이 모든 LLM 호출 예산은 Kueue/GPU 기반 스케줄러가 테넌트별 비용과 꼬리 지연 상한 안에서 배분합니다.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig1_cost_frontier.png" alt="분석적 비용 모델(Eq. 8)에 따른 샘플링 비율 대 상대 비용" />
<em>이진 기준 5개, 플래그 비율 10%, 회의론자 3명을 가정한 분석 모델의 계산값입니다. 전체 항목을 이진 판정하면(k=1) 스칼라 심판 대비 비용이 약 5.3배로 뛰지만, conformal 교정으로 에스컬레이션을 줄여 샘플링 비율 k를 0.2까지 낮추면 해석 가능성과 교정을 유지한 채 스칼라 심판 비용의 약 1.06배까지 수렴합니다. 실측 벤치마크가 아닌 Eq. 8의 계산 결과입니다.</em></p>

<p>이 설계는 이 회사가 이미 사내 하네스에서 상시로 지키는 두 가지 규율, 즉 “형식은 코드가 소유하고 내용은 모델이 소유한다”는 원칙과 팬아웃된 검증 결과를 반드시 적대적 표결로 닫는다는 원칙을, 여러 테넌트가 함께 쓰는 정식 제품 표면으로 승격시킨 결과이기도 합니다. 워커 모델이 자기 답변의 길이나 개수, “전체적으로 몇 점”이라는 자기 보고를 아무리 그럴듯하게 내놓아도 그 값은 폐기되고 코드가 다시 계산하므로, 워커 쪽의 사소한 흔들림이 최종 결과를 오염시키지 못합니다.</p>

<p>이 아키텍처가 실제로 지켜야 할 약속은 세 가지 성질로 정식화되고 증명됩니다. 첫째, 동일한 이진 답변 집합이 주어지면 집계 점수는 무작위 시드나 요청 순서와 무관하게 항상 같은 값을 낸다는 재현성입니다. 둘째, 값싼 1단계 판정과 비싼 2단계 검증이 얼마나 자주 어긋나는지를 conformal 위험 통제로 교정하면, 항목이 어떤 분포에서 나오든 그 불일치율을 목표 수준 이하로 분포에 무관하게 묶어낼 수 있다는 위험 통제 보장입니다. 셋째, 각 테넌트의 이용률을 특정 임계값 아래로 관리하는 어드미션 정책을 두면 대기 이론상 그 테넌트의 평가 지연은 유한한 값으로 유계가 된다는 성질입니다.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig2_latency_bound.png" alt="테넌트 이용률 대 예상 큐잉 지연의 개념도(Prop. 3)" />
<em>M/G/c 큐잉 모델에서 이용률이 1에 가까워질수록 지연이 어떻게 치솟는지를 보여주는 개념 예시 곡선입니다. 어드미션 컨트롤이 샘플링 비율을 조절해 이용률을 목표 임계값 이하로 눌러 두면 꼬리 지연을 관리할 수 있다는 Proposition 3의 논거를 시각화한 것으로, 실측 지연 데이터가 아닙니다.</em></p>

<p>논문은 또한 이진 분해가 언제 실제로 도움이 되는지도 정량적으로 짚습니다. 각 기준을 사람이 스칼라 채점보다 더 안정적으로 답할 수 있고 기준들 사이의 상관이 낮아 서로 독립적인 정보를 담고 있을 때, 이진 분해와 다수결 검증은 스칼라 심판보다 엄밀하게 낮은 분산을 낸다는 조건을 유도합니다. 반대로 기준들이 서로 얽혀 있거나 이진 질문 자체가 손쉽게 눈속임당하는 형태라면 분해는 도움이 되지 않고 오히려 편향을 더할 수 있다는 점도 함께 밝힙니다.</p>

<p><img src="/assets/images/posts/research/atomic-binary-judge-eval-service/fig3_variance_reduction.png" alt="기준 분해가 분산을 줄이는 조건" />
<em>논문 4.4절의 분석적 논거를 시각화한 개념도입니다. 집계 점수의 분산은 대략 기준당 오차분산을 유효 독립 기준 개수로 나눈 값에 비례해 줄어들며, 기준선(스칼라 심판=1배) 대비 상대적인 분산 감소 경향을 보여줍니다. 실험으로 측정된 수치가 아닙니다.</em></p>

<h2 id="회사-사회-과학에-남기는-것">회사, 사회, 과학에 남기는 것</h2>

<p>회사 관점에서 이 논문은 사내 GPU 스케줄링 인프라 위에서 돌아가는 이진 분해 심판, 결정론 집계 게이트, 테넌트별 비용과 지연 상한을 만족하는 샘플링 스케줄러를 하나의 완결된 설계로 정리했습니다. 이미 운영 중이던 내부 규율을 여러 테넌트가 함께 쓰는 제품 표면으로 끌어올린 것입니다. 사회적으로는 데이터가 밖으로 나갈 수 없어 프론티어 API 평가 서비스를 쓸 수 없었던 규제 산업 조직들이 배포 전 안전성과 품질 검증을 자기 하드웨어에서 상시로, 재현 가능하고 감사 가능한 방식으로 수행할 수 있는 길을 엽니다. 신뢰할 수 있는 AI 배포의 진입장벽을 낮추는 셈입니다. 과학적으로는 이진 분해라는 아이디어에 교정, 적대적 검증 표결, 결정론적 집계, 비용 유계 샘플링을 결합했을 때 심판의 신뢰도와 비용이 어떤 관계를 이루는지를 정량화하는 틀을 세우고, 그 관계를 최근 6개월 문헌 위에서 실증하기 위한 사전등록 프로토콜을 함께 제시합니다.</p>

<h2 id="한계">한계</h2>

<p>논문이 스스로 분명히 밝히는 한계가 있습니다. 이 연구는 아키텍처와 세 가지 이론적 증명, 분석적 비용 모델, 그리고 그 프론티어를 사람 라벨 대비 검증하기 위한 사전등록 프로토콜을 제시할 뿐, 실측된 정확도 수치는 담고 있지 않습니다. 저자들은 프로토콜을 돌리지 않고 숫자를 보고하는 것 자체가 조작이라고 못 박고 의도적으로 수치를 비워 두었습니다. 그 밖에도 이진 질문 문구 자체가 눈속임당할 수 있다는 점, 교정 함수가 새로운 모델군이나 적대적 공격의 흐름 아래에서 드리프트할 수 있다는 점, 링크 생존만 확인하는 휴리스틱이 소프트 404 같은 정교한 실패는 놓친다는 점, 기준들이 서로 얽혀 있으면 분산 감소 논증 자체가 깨진다는 점을 한계로 명시하고 있습니다. 그리고 온프렘 소형 워커 모델은 프론티어급 심판보다 원래 성능이 낮아, 해석 가능성과 교정, 재현성, 비용 유계를 얻는 대가로 단일 심판으로서의 정확도를 일부 내준다는 점도 인정합니다.</p>

<p>논문 상세 정보는 Hugging Face에서 확인할 수 있습니다: <a href="https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service">https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-07-atomic-binary-judge-eval-service</a></p>

<h2 id="관련-슬라이드">관련 슬라이드</h2>

<p>본문 내용을 NotebookLM(<code class="language-plaintext highlighter-rouge">neo_swiss</code> 스타일)으로 요약한 슬라이드입니다.</p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-01.png" alt="atomic-binary-judge-eval-service 슬라이드 1" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-02.png" alt="atomic-binary-judge-eval-service 슬라이드 2" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-03.png" alt="atomic-binary-judge-eval-service 슬라이드 3" /></p>

<p><img src="/assets/images/atomic-binary-judge-eval-service-slide-04.png" alt="atomic-binary-judge-eval-service 슬라이드 4" /></p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="research" /><category term="research" /><category term="llm-as-a-judge" /><category term="eval-as-a-service" /><category term="model-evaluation" /><category term="conformal-prediction" /><category term="multi-tenancy" /><category term="kueue" /><category term="on-prem-llm" /><summary type="html"><![CDATA[LLM을 채점자로 쓰는 'LLM-as-a-judge'는 이제 모델 개발의 기본값이지만, 2026년 들어 쌓인 증거는 단일 점수를 내는 스칼라 심판이 프롬프트와 위치에 취약하고 중간값으로 쏠리며 적대적 입력 앞에서 동전 던지기 수준으로 무너진다는 사실을 보여줍니다. 병원이나 은행, 정부기관처럼 데이터가 밖으로 나갈 수 없는 온프렘 멀티테넌트 클러스터에서는 여기에 비용 상한, 지연 상한, 감사 가능성이라는 조건이 추가로 붙습니다. ThakiCloud AI Research가 평가 기준을 원자적 이진 질문으로 쪼개고 그 집계와 검증, 스케줄링을 전부 코드가 소유하도록 설계한 ABJ-Gate 아키텍처를 소개합니다.]]></summary></entry><entry xml:lang="ar"><title type="html">Fable 5 يحتاج أسلوب برمجة أوامر مختلفًا: التحولات الأربعة التي يطرحها دليل Anthropic الرسمي</title><link href="https://thakicloud.github.io/ar/agentops/anthropic-fable5-prompting-guide/" rel="alternate" type="text/html" title="Fable 5 يحتاج أسلوب برمجة أوامر مختلفًا: التحولات الأربعة التي يطرحها دليل Anthropic الرسمي" /><published>2026-07-06T00:00:00+09:00</published><updated>2026-07-06T00:00:00+09:00</updated><id>https://thakicloud.github.io/ar/agentops/anthropic-fable5-prompting-guide</id><content type="html" xml:base="https://thakicloud.github.io/ar/agentops/anthropic-fable5-prompting-guide/"><![CDATA[<h2 id="نظرة-عامة">نظرة عامة</h2>

<p>قبل أن تعاود فتح Claude Fable 5، ثمة وثيقة يجدر بك الاطلاع عليها أولًا. فقد نشرت Anthropic بهدوء دليلًا رسميًا لبرمجة الأوامر الخاص بـ Claude Fable 5 وClaude Mythos 5 ضمن وثائق هندسة البرومبت لديها. ولأنه صدر كصفحة وثائق واحدة دون أي إعلان صاخب، فاتت هذه الوثيقة كثيرين، لكن مضمونها يقلب رأسًا على عقب جزءًا كبيرًا من العادات التي تعاملنا بها مع الجيل السابق من النماذج، وهو ما يجعله غير قابل للتجاهل.</p>

<p>لنبدأ بالنقطة الأكثر مفارقة للحدس. الرسالة المحورية لهذا الدليل ليست “اكتب بشكل أفضل” بل تقترب أكثر من “اكتب أقل”. فالتعليمات المفصّلة التي كانت تُبنى لاستخلاص نتائج جيدة من النماذج السابقة قد تُضعف الجودة فعليًا مع Fable 5. لقد صُمم Fable 5 كنموذج يُفوَّض إليه العمل على مهام معقدة وطويلة وغامضة، من النوع الذي يستغرق من الإنسان ساعات أو أيامًا أو حتى أسابيع لإنجازه، ومثل هذا النموذج تعوقه المقابض الزائدة عن الحاجة. وبما أن ThakiCloud تُشغّل بنية تحتية لخدمات الذكاء الاصطناعي كخدمة (AI/ML SaaS) قائمة على Kubernetes، إلى جانب منصة عملاء (agents) تعمل فوقها، وتتعامل يوميًا مع مثل هذه العملاء المستقلة طويلة الأمد، فإن كل توصية في هذا الدليل تتحول عندنا مباشرة إلى مسألة قواعد تشغيل. يستعرض هذا المقال التحولات الأربعة التي يطرحها الدليل مع الاستناد إلى نص الوثيقة، ويوضح كيف تنعكس على منتجاتنا.</p>

<p><img src="/assets/images/anthropic-fable5-prompting-guide-hero.webp" alt="صورة تجريدية تعبّر عن التحول في أسلوب برمجة الأوامر للعملاء المستقلين طويلي الأمد" /></p>

<h2 id="ما-هو-هذا-الدليل">ما هو هذا الدليل؟</h2>

<p>هذه الوثيقة هي صفحة “Prompting Claude Fable 5” الواردة ضمن قسم هندسة البرومبت في وثائق منصة Anthropic الرسمية. تتناول أنماط برمجة الأوامر والسقالات (scaffolding) الخاصة بـ Fable 5 والفئة الأعلى منه Mythos 5، وتتألف من أربعة عشر فصلًا. وهي، بمعزل عن وثائق البرومبت العامة الموجهة للأجيال السابقة، دليل ذو طابع انتقالي (migration) يركز على ما تغيّر تحديدًا في هذه العائلة من النماذج.</p>

<p>الفرضية الجوهرية التي تخترق الوثيقة هي قفزة في القدرات. صُمم Fable 5 ليتحمّل مسائل كانت أعقد من أن تُمرَّر للنماذج السابقة، أو أطول من أن تُدار، أو أغمض من أن تُصاغ بوضوح. لذا فإن الطريقة الصحيحة للتعامل مع هذا النموذج ليست تشديد الضبط، بل التحول نحو منح النموذج هامشًا للحكم، مع إرساء هيكل من التحقق والتفويض يمنع ذلك الحكم من الانحراف. وتنقسم توصيات الدليل إلى أربعة محاور رئيسية.</p>

<pre><code class="language-mermaid">flowchart TB
    A["تفويض مهام مستقلة طويلة الأمد&lt;br/&gt;(بوحدات ساعات·أيام·أسابيع)"] --&gt; B["التحول 1&lt;br/&gt;حذف التعليمات المفرطة"]
    A --&gt; C["التحول 2&lt;br/&gt;ضبط الذكاء والتكلفة عبر effort"]
    A --&gt; D["التحول 3&lt;br/&gt;تدقيق تقارير التقدم بالأدلة"]
    A --&gt; E["التحول 4&lt;br/&gt;تفويض العملاء الفرعيين بشكل غير متزامن"]
    B --&gt; F["إتاحة هامش لحكم النموذج"]
    C --&gt; F
    D --&gt; G["كبح تقارير التقدم الوهمية"]
    E --&gt; H["معالجة متوازية وإعادة استخدام الذاكرة المخبأة"]
    F --&gt; I["تنفيذ مستقل&lt;br/&gt;طويل الأمد وموثوق"]
    G --&gt; I
    H --&gt; I
</code></pre>

<h2 id="التحول-1-لا-تُضِف-إلى-البرومبت-بل-احذف-منه">التحول 1: لا تُضِف إلى البرومبت، بل احذف منه</h2>

<p>أول توصية ترد في الدليل هي إعادة قراءة البرومبتات والمهارات (skills) الحالية وحذف التعليمات التي لم تعد ضرورية. يوضح الدليل أن البرومبتات والمهارات التي صُممت من أجل النماذج السابقة كثيرًا ما تكون مفرطة التوجيه (too prescriptive) بالنسبة لـ Fable 5، بل قد تُضعف جودة المخرجات فعليًا. وبعبارة أخرى، فإن لحظة القفزة الكبيرة في القدرات هي بالضبط اللحظة المناسبة لتنظيف التعليمات القديمة.</p>

<p>يبدو هذا النصح غريبًا لأننا اعتدنا أن نتعامل مع هندسة البرومبت غالبًا كعملية إضافة. فكلما واجهنا استثناء أضفنا قاعدة، وكلما لاحظنا خطأً أضفنا بندًا منعيًا، فتستمر البرومبتات في التضخم. غير أن كثيرًا من تلك القواعد أُدرجت أصلًا لسدّ ثغرة معينة في نموذج بذاته. فإذا كان النموذج قد تجاوز تلك الثغرة فعلًا، فإن القاعدة المتبقية لا تصبح عونًا، بل تتحول إلى قيد يضيّق على حكم النموذج. وهذا هو السبب في تشديد الدليل على الحذف.</p>

<p>بالطبع، إن قرأنا هذه التوصية على أنها “احذف كل شيء من البرومبت” فسيكون ذلك خطرًا. فثمة تعليمات لا يزال يتوجب إدراجها صراحة، كتعليمات التحقق التي سنتناولها لاحقًا. عمليًا، الأمر أقرب إلى عملية تدقيق: تُزال التعليمات واحدة تلو الأخرى مع التأكد من عدم تراجع الجودة، مع التمييز بين البند الذي كان يسدّ عيبًا في نموذج بعينه، والبند الذي يمثل قيدًا جوهريًا في طبيعة المهمة نفسها.</p>

<h2 id="التحول-2-effort-هو-لوحة-التحكم-الرئيسية-في-الذكاء-والزمن-والتكلفة">التحول 2: effort هو لوحة التحكم الرئيسية في الذكاء والزمن والتكلفة</h2>

<p>في Fable 5، المقبض الأساسي لضبط التوازن بين الذكاء وزمن الاستجابة والتكلفة هو معامل effort. يوصي الدليل ببدء معظم المهام بمستوى high، واستخدام xhigh للأعباء التي تكون فيها القدرة أمرًا حاسمًا بشكل خاص، بينما تُستخدم medium أو low للأعمال المتكررة والنمطية. بعبارة أخرى، بدلًا من إطالة البرومبت لاستخلاص أداء أفضل، أصبح رفع effort أو خفضه بحسب طبيعة المهمة هو أسلوب التشغيل الأساسي.</p>

<p>هذا التغيير مهم من منظور تشغيلي. فرفع effort يجعل النموذج يجري استدلالًا (reasoning) أكثر، مما يرفع زمن الاستجابة والتكلفة معًا. لذا لا ينبغي التعامل مع effort كقيمة تُرفع دائمًا إلى أقصى حد، بل كمفهوم موازنة (budget) يُوزَّع بحسب صعوبة المهمة. فتشغيل المهام النمطية بمستوى xhigh يهدر التكلفة فقط، بينما معالجة القرارات الصعبة بمستوى low يقوّض الجودة. وهنا تصبح دقة توزيع effort، لا رهافة صياغة جملة البرومبت، هي العامل الذي يحدد النتيجة والفاتورة في آن واحد.</p>

<h2 id="التحول-3-أخضِع-تقارير-التقدم-لتدقيق-قائم-على-الأدلة">التحول 3: أخضِع تقارير التقدم لتدقيق قائم على الأدلة</h2>

<p>أشدّ أنماط الفشل إيلامًا في المهام المستقلة طويلة الأمد هو أن يُبلَّغ بثقة عن إنجاز عمل لم يُتحقق منه فعليًا. فحين تدور حلقة تستغرق ساعات ويقول النموذج “لقد أنهيت هذه الخطوة” دون أساس حقيقي لهذا الادّعاء، يصبح هذا التقرير غير موثوق، وقد تُبنى المهام اللاحقة فوق حالة خاطئة دون أن يُنتبه لذلك.</p>

<p>يقدّم الدليل جملة تعليمات محددة لهذه المشكلة: قبل الإبلاغ عن التقدم، ينبغي تدقيق كل ادّعاء بمقارنته مع نتائج الأدوات (tool results) في الجلسة الحالية، والإبلاغ فقط عن العمل الذي يمكن الإشارة إلى دليل عليه، مع التصريح بوضوح إن كان أمر ما لم يُتحقق منه بعد. وفيما يلي نص التعليمة الأصلية كما ورد:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Before reporting progress, audit each claim against a tool result
from this session. Only report work you can point to evidence for;
if something is not yet verified, say so.
</code></pre></div></div>

<p>تشير Anthropic إلى أن هذه التعليمة، في اختباراتها الداخلية، قضت شبه كليًا على تقارير التقدم الملفّقة، حتى في المهام المصمّمة خصيصًا لاستدراج تقارير وهمية. والنقطة الجوهرية هنا مزدوجة. أولًا، هذا لا يتناقض مع التحول الأول القاضي بالحذف؛ فالقواعد القديمة التي كانت تسدّ عيوب النموذج تُحذف، لكن تعليمات من هذا النوع، التي تحمي موثوقية التنفيذ المستقل، يجب أن تُدرج صراحة. ثانيًا، معيار التحقق هنا لا يُستمد من ثقة النموذج بنفسه، بل من دليل خارجي هو نتيجة الأداة. وهذا يتطابق تمامًا مع مبدأ التزمناه طويلًا، وهو ألا يُعتمد تقرير النموذج الذاتي كشرط لإنهاء الحلقة.</p>

<h2 id="التحول-4-نظّم-العملاء-الفرعيين-بشكل-غير-متزامن">التحول 4: نظّم العملاء الفرعيين بشكل غير متزامن</h2>

<p>التحول الرابع يتعلق ببنية تعدد العملاء (multi-agent). وفقًا للدليل، يتمتع Fable 5 باستقرار أعلى بكثير في إطلاق العملاء الفرعيين المتوازين والحفاظ عليهم، كما يدير بموثوقية العملاء الفرعيين طويلي الأمد والتواصل المستمر مع عملاء آخرين. والتوصية واضحة: استخدم العملاء الفرعيين بكثرة، مع تزويدهم بتوجيه صريح حول متى يكون التفويض مناسبًا، وفضّل التواصل غير المتزامن على أن ينتظر المنسّق (orchestrator) عودة كل عميل فرعي مع تعطّل التنفيذ في الأثناء.</p>

<p>وثمة أساس اقتصادي وأدائي فعلي لذلك. فالعملاء الفرعيون طويلو الأمد (long-lived) الذين يحافظون على السياق (context) عبر مهام فرعية متعددة، يوفرون الوقت والتكلفة عبر إعادة استخدام الذاكرة المخبأة (cache reuse)، ويتجنبون اختناقًا يعطّل النظام بأكمله بسبب أبطأ عميل فرعي. والنصيحة بتفويض المهام الفرعية المستقلة إلى العملاء الفرعيين مع استمرار المنسّق في العمل في الأثناء تشبه إلى حد كبير الطريقة التي يدير بها الإنسان فريقًا. أما التوصية باستخدام عميل فرعي مستقل للتحقق بدلًا من الاكتفاء بالنقد الذاتي وحده لضمان الجودة، فهي ترفع مبدأ التحقق القائم على الأدلة من التحول الثالث إلى مستوى تعدد العملاء.</p>

<h2 id="دلالات-التطبيق-على-منتجات-thakicloud">دلالات التطبيق على منتجات ThakiCloud</h2>

<p>ينعكس هذا الدليل بشكل مباشر بوجه خاص على منصة Paxis التي نُشغّلها. Paxis هي Agent-Native Cloud الخاصة بـ ThakiCloud، وهي مستوى تحكم يختار من بين أكثر من 960 مهارة (skill) عبر خوارزمية BM25 وينفّذها في صناديق معزولة (sandboxes)، مع تمرير كل إجراء عبر بوابات سياسة وسجلات تدقيق (audit logs). وتتطابق التحولات الأربعة في الدليل مع هذه البنية واحدًا واحدًا.</p>

<p>فلسفة الحذف في التحول الأول تتقاطع مع مبادئ تصميم المهارات في Skill Harness لدينا؛ إذ التزمنا فعلًا بإبقاء المهارات خفيفة (thin) وتكديس المعرفة النطاقية بكثافة في متن المهارة، مع التعامل مع أي جملة زائدة كتكلفة على السياق يجب إزالتها. وهذا التأكيد الرسمي على أن Fable 5 لا يفضّل التعليمات المفرطة يمنحنا سندًا لإزالة البنود التي كانت تسدّ ثغرات نماذج جيل سابق من مهاراتنا القديمة. أما التحقق القائم على الأدلة في التحول الثالث، فهو الدور الذي تؤديه أصلًا بوابات السياسة وسجلات التدقيق لدينا؛ فادّعاء النموذج بإنجاز مهمة يختلف عن كون هذا الإنجاز مدعومًا فعليًا بنتائج الأدوات وسجلات التدقيق، وPaxis تتعامل مع الثاني كمورد من الدرجة الأولى. وتنظيم العملاء الفرعيين بشكل غير متزامن في التحول الرابع يطابق تمامًا تنفيذ تعدد العملاء القائم على DAG لدينا؛ فبنية منسّق يُمرّر المهام المستقلة بالتوازي دون تعطّل ثم يُغلق الحلقة عبر عقدة تحقق، تتطابق تمامًا مع مبدأنا القاضي بإغلاق أي تفرّع متوازٍ (fan-out) عبر مرحلة تحقق.</p>

<p>كما يجب النظر إلى الأمر من زاوية البنية التحتية لمنصة ai-platform. فرفع effort إلى xhigh يزيد من عدد رموز الاستدلال (reasoning tokens) مما يرفع الطلب على حوسبة GPU، وإطلاق عدد كبير من العملاء الفرعيين المتوازين يولّد ذروة مؤقتة في حِمل GPU. صُممت منصة ai-platform لدى ThakiCloud لامتصاص هذا الحِمل المتغيّر عبر جدولة GPU قائمة على Kueue وعزل متعدد المستأجرين (multi-tenant). كما أن ملاحظة الدليل بأن إعادة استخدام الذاكرة المخبأة لدى العملاء الفرعيين طويلي الأمد تخفض التكلفة تتفق مع هدفنا في خفض تكلفة الخدمة (serving) في البيئات المحلية والسيادية. فالخدمة منخفضة التكلفة تصنع جدوى اقتصادية للعملاء، وهذه الجدوى تتيح بدورها تفويضًا متوازيًا أكثر جرأة، في حلقة تعزيز متبادلة.</p>

<h2 id="القيود-والاعتراضات">القيود والاعتراضات</h2>

<p>قبل التسليم المطلق بهذا الدليل، لا بد من توضيح عدة نقاط. أولًا، هذه الوثيقة موجهة تحديدًا لـ Fable 5 وMythos 5. فإن نُقلت استراتيجية الحذف أو الإعدادات الافتراضية لـ effort الموصى بها هنا مباشرة إلى نماذج بائعين آخرين أو إلى الجيل السابق، فقد تتراجع الجودة فعليًا. لذا يجب قراءة نطاق هذه التوصيات محصورًا داخل هذه العائلة من النماذج.</p>

<p>ثانيًا، نصيحة “احذف من البرومبت” قابلة لسوء الاستخدام بسهولة. فثمة تعليمات يجب أن تبقى بصرف النظر عن أداء النموذج، كقيود السلامة واللوائح النطاقية وسياسات المؤسسة. فالحذف ليس تنظيفًا عشوائيًا، بل يجب أن يكون تدقيقًا يميّز بين البند الذي كان يسدّ عيبًا في نموذج جيل سابق، والقيد الذي يمثل جوهر المهمة نفسها. والدليل نفسه يوصي بإدراج تعليمات التحقق صراحةً، مما يعني أن رسالته أقرب إلى “اكتب أقل، لكن أبقِ بوضوح على ما يجب أن يبقى”.</p>

<p>ثالثًا، الرقم القائل بأن تقارير التقدم الوهمية كادت أن تختفي تمامًا هو نتيجة اختبار داخلي أجرته Anthropic نفسها، وليس قيمة أعدنا التحقق منها بشكل مستقل في هذا المقال. نحن نتفق مع اتجاه فعالية تعليمات التحقق، لكن على كل مؤسسة أن تقيس معدل الفشل الفعلي في عبء عملها الخاص قبل أن تحدد مستوى الثقة المناسب. وأخيرًا، توصية جعل effort افتراضيًا عند high ترفع التكلفة وزمن الاستجابة معًا، لذا يجب على الفرق ذات الميزانية المحدودة أن تخفض بجرأة المهام النمطية إلى medium وlow لإيجاد توازنها الخاص في التوزيع.</p>

<p>خلاصة القول إن قيمة هذا الدليل لا تكمن في عبارة سحرية جديدة، بل في تحوّل في الموقف تجاه التعامل مع نموذج أقوى: امنحه هامشًا للحكم بدلًا من إضافة مزيد من الضبط، ثم تحقق من ذلك الحكم بالأدلة، ووازِه عبر التفويض. ومن منظور من يُشغّل فعليًا عملاء مستقلين طويلي الأمد، هذا ليس شعارًا رائجًا، بل إعادة ترتيب لقواعد التشغيل ذاتها.</p>

<h2 id="المصادر">المصادر</h2>

<ul>
  <li>Anthropic, “Prompting Claude Fable 5”, Claude Platform Docs: <a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5">https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5</a></li>
</ul>
<p>&lt;/content&gt;</p>]]></content><author><name>{&quot;name&quot;=&gt;nil, &quot;avatar&quot;=&gt;nil, &quot;bio&quot;=&gt;nil, &quot;location&quot;=&gt;&quot;Seoul, Korea&quot;, &quot;email&quot;=&gt;&quot;info@thakicloud.co.kr&quot;, &quot;uri&quot;=&gt;nil, &quot;home&quot;=&gt;nil, &quot;links&quot;=&gt;[{&quot;label&quot;=&gt;&quot;Website&quot;, &quot;icon&quot;=&gt;&quot;fas fa-fw fa-link&quot;, &quot;url&quot;=&gt;&quot;https://thakicloud.co.kr&quot;}, {&quot;label&quot;=&gt;&quot;GitHub&quot;, &quot;icon&quot;=&gt;&quot;fab fa-fw fa-github&quot;, &quot;url&quot;=&gt;&quot;https://github.com/thakicloud&quot;}]}</name><email>info@thakicloud.co.kr</email></author><category term="agentops" /><category term="ai-coding" /><category term="agentic" /><category term="claude-fable-5" /><category term="prompt-engineering" /><category term="agentops" /><category term="verification" /><category term="subagents" /><summary type="html"><![CDATA[نشرت Anthropic بهدوء دليلًا رسميًا لبرمجة الأوامر (prompting) الخاص بـ Claude Fable 5 و Mythos 5. والفكرة الجوهرية ليست صياغة أوامر أكثر تفصيلًا، بل العكس تمامًا: احذف التعليمات المتراكمة التي بُنيت من أجل النماذج السابقة، واضبط الذكاء والتكلفة عبر معامل effort، وأخضع تقارير التقدم لتدقيق قائم على الأدلة، ونظّم العملاء الفرعيين (subagents) بشكل غير متزامن. نستعرض هذه التحولات الأربعة بالاستناد إلى الوثيقة الأصلية، ونوضح ما الذي يتغير من منظور تشغيل Paxis Agent-Native Cloud ومنصة ai-platform لدى ThakiCloud.]]></summary></entry></feed>