πŸ˜… AI Copilot으둜 ν”Œλž«νΌ μ—”μ§€λ‹ˆμ–΄λ§ μž¬μ •μ˜μ— λŒ€ν•œ κ³ μ°° πŸš€

:technologist: AI μ½”νŒŒμΌλŸΏ: 3계측 μ•„ν‚€ν…μ²˜

AI μ½”νŒŒμΌλŸΏ μ‹œμŠ€ν…œμ€ λ‹¨μˆœνžˆ LLM ν•œ 번 ν˜ΈμΆœν•˜λŠ” 방식이 μ•„λ‹™λ‹ˆλ‹€. 마치 세계 졜고 μˆ˜μ€€μ˜ μˆ˜μ„ μ—”μ§€λ‹ˆμ–΄κ°€ μ‚¬κ³ ν•˜λŠ” 과정을 흉내 λ‚΄λŠ” μ •κ΅ν•œ 3계측 ν”Œλž«νΌμœΌλ‘œ μ„€κ³„λ˜μ—ˆμŠ΅λ‹ˆλ‹€. :rocket:

:magnifying_glass_tilted_right: Layer 1: Universal Translator (μ˜λ„ 인식)

첫 번째 계측은 νŒŒμΈνŠœλ‹λœ λŒ€κ·œλͺ¨ μ–Έμ–΄ λͺ¨λΈ(예> Claude 3)둜, μΌμ’…μ˜ β€œ Universal Translator” 역할을 ν•©λ‹ˆλ‹€. 이 λͺ¨λΈμ€ 수천 건의 λ‚΄λΆ€ 섀계 λ¬Έμ„œ, 런뢁, κΈ°μ‘΄ YAML 파일둜 ν•™μŠ΅λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

이 κ³„μΈ΅μ˜ μœ μΌν•œ μž„λ¬΄λŠ” μžμ—°μ–΄λ‘œ μž‘μ„±λœ spec을 읽고, 이λ₯Ό κ΅¬μ‘°ν™”λœ 기계 νŒλ… κ°€λŠ₯ν•œ ν˜•μ‹μœΌλ‘œ λ³€ν™˜ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

  • μžμ—°μ–΄λ‘œ μž‘μ„±λœ spec 예제
    • " 우리의 μƒˆλ‘œμš΄ recommendations-apiλ₯Ό ν”„λ‘œλ•μ…˜ μ„œλΉ„μŠ€λ‘œ 배포해 μ£Όμ„Έμš”. Go μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ΄λ©°, 10GB Postgres λ°μ΄ν„°λ² μ΄μŠ€μ™€ μž‘μ€ Redis μΊμ‹œκ°€ ν•„μš”ν•©λ‹ˆλ‹€. 높은 νŠΈλž˜ν”½μ„ μ²˜λ¦¬ν•  수 μžˆλ„λ‘ autoscale이 λ˜μ–΄μ•Ό ν•˜κ³ , μ„Έ 개의 availability zones에 걸쳐 high availabilityλ₯Ό μœ μ§€ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ•Œλ¦Όμ€ #recommendations-alerts Slack μ±„λ„λ‘œ 보내 μ£Όμ„Έμš”. μ›” λΉ„μš©μ€ $1,500 μ΄ν•˜λ‘œ μœ μ§€ν•΄ μ£Όμ„Έμš”."

μ•„λž˜μ™€ 같이 μžμ—°μ–΄λ‘œ μž‘μ„±λœ spec을 이 κ³„μΈ΅μ—μ„œ κ΅¬λ™ν•˜λŠ” Python μ½”λ“œμ˜ μΌλΆ€λ‘œ λ§Œλ“€μ–΄μ€λ‹ˆλ‹€. :hammer_and_wrench:

# A simplified look at our intent recognition engine
import json
from anthropic import Anthropic

class IntentRecognizer:
    def __init__(self, fine_tuned_model_id):
        self.client = Anthropic()
        self.model_id = fine_tuned_model_id
    def parse_spec(self, natural_language_spec: str) -> dict:
        prompt = f"""
        You are a world-class Principal Engineer. Your task is to analyze the following
        high-level service specification and translate it into a structured JSON object.
        Identify all application components, their resource requirements (CPU, memory, storage),
        their dependencies, networking rules, scaling policies, and any security or cost constraints.
        Specification:
        ---
        {natural_language_spec}
        ---
        Return only the structured JSON object.
        """
        response = self.client.messages.create(
            model=self.model_id,
            max_tokens=2048,
            messages=[{"role": "user", "content": prompt}]
        )
        return json.loads(response.content[0].text)

:building_construction: Layer 2: Master Builder (λ©€ν‹° ν΄λΌμš°λ“œ Generator)

μ˜λ„κ°€ κ΅¬μ‘°ν™”λ˜λ©΄ 이제 **β€œMaster Builder”**κ°€ μž‘μ—…μ„ μ΄μ–΄λ°›μŠ΅λ‹ˆλ‹€. 이 계측은 결정둠적 μ½”λ“œ μƒμ„±κΈ°λ‘œ, LLMμ—μ„œ λ‚˜μ˜¨ JSON 객체λ₯Ό λ°›μ•„ μ‹€μ œ Kubernetes YAMLκ³Ό Terraform HCL을 μƒμ„±ν•©λ‹ˆλ‹€.

μ—¬κΈ°μ„œ μ€‘μš”ν•œ 점은 AIκ°€ μ½”λ“œλ₯Ό μ²˜μŒλΆ€ν„° 직접 μž‘μ„±ν•˜μ§€ μ•ŠλŠ”λ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€. λŒ€μ‹  μš°λ¦¬κ°€ 미리 μŠΉμΈν•˜κ³  μˆ˜μ—†μ΄ κ²€μ¦ν•΄μ˜¨ 인프라 νŒ¨ν„΄ 라이브러리λ₯Ό ν™œμš©ν•©λ‹ˆλ‹€. μ‹ λ’°ν•  수 μžˆλŠ” ꡬ성 μš”μ†Œλ₯Ό μ‘°ν•©ν•˜λŠ” λ°©μ‹μœΌλ‘œ 일관성과 λͺ¨λ²” 사둀 μ€€μˆ˜λ₯Ό 보μž₯ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. :white_check_mark:

:shield: Layer 3: Digital Immune System (λ””μ§€ν„Έ λ©΄μ—­ μ‹œμŠ€ν…œ - μ •μ±… 기반 검증 & κ°œμ„ )

이 κ³„μΈ΅μ΄μ•Όλ§λ‘œ κ°€μž₯ 핡심적인 λΆ€λΆ„μž…λ‹ˆλ‹€. μ½”λ“œ ν•œ 쀄이 μ»€λ°‹λ˜κΈ° 전에 λ°˜λ“œμ‹œ **β€œDigital Immune System ”**을 톡과해야 ν•©λ‹ˆλ‹€. λ‹¨μˆœν•œ returnλ˜λŠ” 것이 μ•„λ‹ˆλΌ, λ‹«νžŒ 루프 ν˜•νƒœμ˜ 검증과 κ°œμ„  μ—”μ§„μž…λ‹ˆλ‹€.

:white_check_mark: Validation (검증): μƒμ„±λœ μ½”λ“œλ₯Ό λŒ€μƒμœΌλ‘œ 수백 κ°€μ§€ 검사λ₯Ό μ‹€ν–‰ν•©λ‹ˆλ‹€. λ³΄μ•ˆ 취약점, λΉ„μš© μΆ”μ •, 잠재적인 μ‹ λ’°μ„± λ¬Έμ œκΉŒμ§€ μ² μ €νžˆ μ κ²€ν•©λ‹ˆλ‹€.

:wrench: Refinement (κ°œμ„ ): λ¬Έμ œκ°€ 발견되면(예: 퍼블릭에 λ…ΈμΆœλœ μ„œλΉ„μŠ€, κ³Όλ„ν•˜κ²Œ 큰 λ°μ΄ν„°λ² μ΄μŠ€ λ“±) λ‹¨μˆœνžˆ λΉŒλ“œλ₯Ό μ‹€νŒ¨μ‹œν‚€μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μœ„λ°˜ 사항 λͺ©λ‘κ³Ό ν•¨κ»˜ μ½”λ“œλ₯Ό λ‹€μ‹œ LLM에 보내 β€œμ΄ λ¬Έμ œλ“€μ„ μˆ˜μ •ν•˜λΌβ€λŠ” μƒˆλ‘œμš΄ ν”„λ‘¬ν”„νŠΈλ₯Ό μ „λ‹¬ν•©λ‹ˆλ‹€.

이 반볡 λ£¨ν”„λŠ” μ½”λ“œκ°€ 우리 정책을 100% μ€€μˆ˜ν•  λ•ŒκΉŒμ§€ κ³„μ†λ©λ‹ˆλ‹€. 즉, μ‚¬λžŒμ΄ 보기 전에 μžλ™μœΌλ‘œ 문제λ₯Ό μž‘μ•„λ‚΄λŠ” μ™„μ „ μžλ™ν™”λœ μ½”λ“œ 리뷰인 κ²ƒμž…λ‹ˆλ‹€. :rocket:

[좜처] https://medium.com/write-a-catalyst/we-fired-our-yaml-the-intern-is-now-our-best-platform-engineer-2eb447a895bf

1 Like