๐Ÿ“ฆ AI Model์—์„œ AI System์œผ๋กœ์˜ ์ง„ํ™”

๐Ÿ“ฆ AI Model์—์„œ AI System์œผ๋กœ์˜ ์ง„ํ™”
Photo by Arno Senoner / Unsplash

1.Compound AI System is

LLM์˜ ๋Œ€์ค‘ํ™”์™€ ํ•จ๊ป˜, AI Model์€ Application์˜ ์ฃผ์š” ์š”์†Œ๋กœ์จ ๋น ๋ฅด๊ฒŒ ๊ด€์‹ฌ์„ ์ด๋Œ๊ณ  ์žˆ๋‹ค. Compound AI System์€ Traditional Software์™€ AI Model์˜ ๊ฒฐํ•ฉ์œผ๋กœ์จ Google์˜ AlphaCode 2, ย AlphaGeometry ๋“ฑ ๋น…ํ…Œํฌ์˜ LLM ๋ชจ๋ธ์€ Compound AI System์˜ ํšจ๊ณผ์„ฑ์„ ์ž˜ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ์œผ๋ฉฐ, ๋ชจ๋ธ๊ณผ ์—”์ง€๋‹ˆ์–ด๋ง์˜ ์กฐํ•ฉ์„ ํ†ตํ•ด์„œ ๋ณด๋‹ค ๋‚˜์€ ์„ฑ๊ณผ๋ฅผ ๋งŒ๋“ค ์ˆ˜๋„ ์žˆ์Œ์„ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ๋‹ค.

2.Why Use Compound AI Systems?

  • ์ผ๋ถ€ ์ž‘์—…์€ ๊ตณ์ด Model๋ณด๋‹ค๋Š” ์‹œ์Šคํ…œ ๊ฐœ์„ ์„ ํ†ตํ•ด์„œ ํ•˜๋Š” ๊ฒƒ์ด ๋” ์‰ฌ์šธ ์ˆ˜ ์žˆ๋‹ค.
  • ๋ชจ๋ธ์€ ์ •์  ๋ฐ์ดํ„ฐ๋กœ ํ›ˆ๋ จ์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋ณด๋‹ค ๋‹ค์–‘ํ•œ ๋™์  ์š”์†Œ๋ฅผ ๊ฒฐํ•ฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Model์„ ๋„˜์–ด Traditional Software ๊ด€์ ์—์„œ ์„ค๊ณ„ ๊ณ ๋ ค๊ฐ€ ํ•„์š”ํ•˜๋‹ค.
  • System์„ ์ž˜ ํ™œ์šฉํ•˜๋ฉด Controllability์™€ ์‹ ๋ขฐ๋„๋ฅผ ๋†’์ด๋Š”๋ฐ ๋” ์ ํ•ฉํ•˜๋‹ค. AI ๋ชจ๋ธ์€ ๋ถˆํ™•์‹ค์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.
  • ์„ฑ๊ณผ ๋ชฉํ‘œ๋Š” ๋งค์šฐ ๋‹ค์–‘ํ•˜๊ณ  ๊ด€๋ จ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ๋ณ€๊ฒฝํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๋Š” ๋งŽ๊ธฐ ๋•Œ๋ฌธ์— ๋ชจ๋ธ๊ณผ ์‹œ์Šคํ…œ์˜ ์ ์ ˆํ•œ ๊ฒฐํ•ฉ์ด ์šด์šฉํ•˜๊ธฐ ๋‚˜์„ ์ˆ˜ ์žˆ๋‹ค.

3.Developing Compound AI Systems

  • Compound AI System์€ Traditional Software์™€ AI Model์˜ ๊ฒฐํ•ฉ
  • ์–ด๋””๊นŒ์ง€ ๋ชจ๋ธ๋กœ ํ•˜๊ณ , ์–ด๋””๊นŒ์ง€๋ฅผ Software๊ด€์ ์—์„œ ์ปค๋ฒ„ํ•ด์•ผํ• ์ง€์— ๋Œ€ํ•œ ๊ณ ๋ฏผ ํ•„์š”

4.Key Challenges in Compound AI Systems

Design Space

  • ์—ฌ๋Ÿฌ ๊ธฐ์ˆ ๋“ค์„ ์ข…ํ•ฉ์ ์œผ๋กœ ํ™œ์šฉํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐœ๋ฐœ์‹œ ๊ณ ๋ คํ•ด์•ผํ•  ์š”์†Œ๊ฐ€ ๋งค์šฐ ๋งŽ์Œ
  • ์ œํ•œ๋œ ๋ฆฌ์†Œ์Šค ๋‚ด์—์„œ Latency๋“ฑ์„ ์š”์†Œ๋ณ„๋กœ ์ž˜ ๋ฐฐ๋ถ„ํ•ด์•ผ ํ•จ

Optimization

  • ๋‹ค์–‘ํ•œ ์š”์†Œ๋“ค์ด ๊ฒฐํ•ฉ๋œ ์‹œ์Šคํ…œ ๋‚ด์—์„œ์˜ ๋ฆฌ์†Œ์Šค ๋ฐ ์„ฑ๋Šฅ ์ตœ์ ํ™” ์ด์Šˆ
  • DSPyย ๋Š” LLMํŒŒ์ดํ”„๋ผ์ธ์„ ์œ„ํ•œ Optimizer๋ฅผ ์ œ๊ณต

Operation

  • ๊ธฐ์กด ํ•˜๋‚˜์˜ ๋ชจ๋ธ์„ ์šด์šฉํ•˜๊ณ  ํŠธ๋ž˜ํ‚นํ•˜๋Š” ๊ฒƒ๋Œ€๋น„ ํ›จ์”ฌ ๋ณต์žกํ•œ ์‹œ์Šคํ…œ์„ ์šด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•ด์•ผํ•  ํ•„์š”๊ฐ€ ์žˆ์Œ
    • ๋ชจ๋‹ˆํ„ฐ๋ง: ์‹œ์Šคํ…œ ๋ณต์žก๋„์™€ ๋งž๋ฌผ๋ ค ์–ด๋–ป๊ฒŒ ํšจ๊ณผ์ ์œผ๋กœ ๋กœ๊น…ํ•˜๊ณ , ๋ถ„์„ํ•˜๊ณ  ๋””๋ฒ„๊น…ํ•  ๊ฒƒ์ธ์ง€ ์ „๋žต ํ•„์š”
    • DataOps: ๋ฐ์ดํ„ฐ ์„œ๋น™์„ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์‹œ์Šคํ…œ๊ณผ ๋ฐ์ดํ„ฐ์˜ ํ’ˆ์งˆ, ๊ทธ๋ฆฌ๊ณ  ํŒŒ์ดํ”„๋ผ์ธ์„ ์–ด๋–ป๊ฒŒ ๊ด€๋ฆฌํ•  ๊ฒƒ์ธ์ธ๊ฐ€์— ๋Œ€ํ•œ ๊ณ ๋ฏผ ํ•„์š”
    • ๋ณด์•ˆ: ์‹œ์Šคํ…œ์˜ ๋ณต์žก๋„์™€ ๋งž๋ฌผ๋ ค ๋” ๋งŽ์€ ๋ณด์•ˆ ์ด์Šˆ ๋…ธ์ถœ ๊ฐ€๋Šฅ์„ฑ ์žˆ์Œ

5.Emerging Paradigms

์œ„์—์„œ ์–ธ๊ธ‰ํ•œ Challenge๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฐฉ์‹๋“ค์ด ํ˜„์žฌ ๋ถ€์ƒํ•˜๊ณ  ์žˆ์Œ

Designing AI Systems: Composition Frameworks and Strategies

  • ๊ฐœ๋ฐœ์ž๋Š” โ€œlanguage model programmingโ€ย framework์„ ์ด์šฉํ•ด์„œ AI Model๊ณผ ์™ธ๋ถ€ ์‹œ์Šคํ…œ์„ ๊ฒฐํ•ฉํ•˜๊ณ  ์žˆ์Œ
  • ์ด ๋•Œ์‚ฌ์šฉํ•˜๋Š” ์š”์†Œ๋“ค์€ย LangChainย ย LlamaIndexย ์™ธ์—๋„ ย AutoGPT, ย BabyAGIย , ย Guardrails,ย Outlines,ย LMQLย ,SGLang๋“ฑ์ด ์žˆ์Œ
  • ์ด์™ธ์—๋„ ย chain-of-thought,ย self-consistency,ย WikiChat,ย RAGย ๋“ฑ์„ ์ด์šฉํ•ด์„œ ๋‹ค์–‘ํ•œ AI ์‹œ์Šคํ…œ ๋””์ž์ธ ์ „๋žต์„ ๊ตฌ์„ฑํ•ด๋‚ด๊ณ  ์žˆ์Œ

Automatically Optimizing Quality: DSPy

  • DSPyย ๋Š” ํ•™๊ณ„์—์„œ ๋‚˜์˜จ Compound AI System ์ตœ์ ํ™” ๊ด€๋ จ ์ฒ˜์Œ ๋“ฑ์žฅํ•œ framework
  • LLM์„ ํ™œ์šฉํ•ด์„œ ์ž์—ฐ์–ด ๊ธฐ๋ฐ˜์œผ๋กœ ๊ฐ ๋ชจ๋“ˆ์„ ๊ตฌ์ฒดํ™”ํ•˜๊ณ  ์ฃ„์ ํ™”ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ œ๊ณต

Optimizing Cost: FrugalGPT and AI Gateways

  • FrugalGPTย ์ตœ์†Œ ๋น„์šฉ์œผ๋กœ ์ตœ์ ์˜ ํšจ๊ณผ๋ฅผ ๋‚ผ ์ˆ˜ ์žˆ๋Š” ๋ชจ๋ธ ์กฐํ•ฉ์„ ์ฐพ์•„๋‚ด๊ธฐ ์œ„ํ•œ Framework ํ™œ์šฉ
  • Frugal GPT๋Š” ย Databricks AI Gateway,ย OpenRouter, ย Martian ์†”๋ฃจ์…˜์— AI ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ฐ ๊ตฌ์„ฑ์š”์†Œ๋ฅผ ์ตœ์ ํ™”ํ•˜๊ธฐ ์œ„ํ•œ ๋ชฉ์ ์œผ๋กœ ํ™œ์šฉ ๋จ

Operation: LLMOps and DataOps

  • ๋ชจ๋“  ๋‹จ๊ณ„ ๋ณ„ ์ถœ๋ ฅ์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง ํ•„์š”
  • LangSmith,ย Phoenix Traces, Databricks Inference Table๋“ฑ์˜ ์†”๋ฃจ์…˜์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Œ
  • ํ•™๊ณ„์—์„œ๋Š” DSPy Assertions์ ์šฉ ๋“ฑ์„ ๊ณ ๋ คํ•ด๋ณผ ์ˆ˜ ์žˆ์Œ
  • MT-Bench,ย FAVAย ,ย ARES๋“ฑ์˜ AI ๊ธฐ๋ฐ˜ ํ’ˆ์งˆ ํ‰๊ฐ€ ๋ฐฉ๋ฒ•๋ก  ๋“ฑ์„ ํ†ตํ•ด์„œ ํ’ˆ์งˆ ๋ชจ๋‹ˆํ„ฐ๋ง ์ž๋™ํ™” ์ ์šฉ ๊ฐ€๋Šฅ

6. References