ใช้โทเคนน้อยลงในการสร้าง UI

AI เขียนโทเคนน้อยลง 26% ด้วย Lyra UI

เราให้ Claude Sonnet สร้างอินเทอร์เฟซแชต แดชบอร์ด และการตั้งค่าชุดเดียวกัน ด้วย Lyra UI ด้วย React, Tailwind และ shadcn/ui และด้วย HTML, CSS และ JavaScript ล้วน (18 รอบ) เมื่อใช้ Lyra UI โมเดลเขียนโทเคนเอาต์พุตน้อยลง 26% และจำนวนบรรทัดน้อยลง 46% เมื่อเทียบกับ shadcn/ui และใช้โทเคนน้อยลง 33% เมื่อเทียบกับ HTML ล้วน เพราะแท็กเดียวแทนทั้งมาร์กอัป สไตล์ และสถานะ การรันด้วย Lyra ยังอ่านเอกสารอ้างอิง llms-full.txt ซึ่งเอเจนต์แคชและนำกลับมาใช้ซ้ำได้

ตัวอย่าง

อินเทอร์เฟซแชตด้วยแท็กไม่กี่ตัว

<script type="module">
  import '@aceshooting/lyra-ui/components/lr-chat-viewport.js';
  import '@aceshooting/lyra-ui/components/lr-chat-message.js';
  import '@aceshooting/lyra-ui/components/lr-chat-composer.js';
</script>

<lr-chat-viewport>
  <lr-chat-message message-role="user">Summarize this report.</lr-chat-message>
  <lr-chat-message message-role="assistant" status="streaming">Here are the key points…</lr-chat-message>
</lr-chat-viewport>
<lr-chat-composer placeholder="Ask anything"></lr-chat-composer>

สำรวจคอมโพเนนต์ · อ่านคู่มือ (ภาษาอังกฤษ)