Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LLM エージェントを使った実験

LLM エージェントを使った実験

Avatar for Moto Ishizawa

Moto Ishizawa

July 21, 2023
Tweet

More Decks by Moto Ishizawa

Other Decks in Technology

Transcript

  1. gptask • LLM ʹ೚ҙͷίϚϯυͱ Python ίʔυΛ࣮ߦͤ͞Δ CLI • LangChain ͷ

    ReAct Agent ͕Ͳ͏ಈ͍͍ͯΔͷ͔஌Γͨͯ͘։ൃ • ΤϥʔΛࣗΒमਖ਼ͯ͠λεΫΛ࠶࣮ߦ͢ΔͳͲͷϙςϯγϟϧͷߴ͞ʹڻ͘ $ gptask "AWS Ͱϙʔτ͕શ։์͞Ε͍ͯΔ Security Group ΛϦετΞοϓͯ͠"
  2. code-search-agent • ίʔυΛॻ͍ͯ΋Β͏લఏͱͯ͠ɺ·ͣݕࡧΛͰ͖ΔΑ͏ʹͨ͠ LLM ΤʔδΣϯτ • GPT-4 ͱ Language Server

    Protocol (LSP) Λ૊Έ߹ΘͤͯɺEmbedding ͳͲ͸࢖༻ͤͣʹίʔ υ΍γϯϘϧΛݕࡧͯ͠ճ౴ͯ͠΋Β͏࢓૊Έ • Kubernetes ͷΑ͏ͳڊେͳίʔυϕʔεͰ΋ͦͦ͜͜ͷਫ਼౓Ͱճ౴Ͱ͖Δ͜ͱ͕෼͔ͬͨ $ code-search-agent \ -r github.com/kubernetes/kubernetes \ "Deployment ϦιʔεͷόϦσʔγϣϯΛ΍͍ͬͯΔίʔυΛ୳ͯ͠ɺͦͷ৔ॴͱఆٛ಺༰Λࣔͯ͠ॲཧͷઆ໌Λ͍ͯͩ͘͠͞" The `ValidateDeployment` function in the file `pkg/apis/apps/validation/validation.go` is responsible for validating Deployment resources in Kubernetes. It calls two other validation functions on the deployment object: `apivalidation.ValidateObjectMeta` which validates the metadata of the deployment object, including the deployment name; and `ValidateDeploymentSpec` which validates the spec of the deployment object. These checks ensure that the deployment object is correctly formed and holds valid data, thereby avoiding invalid configurations in the Kubernetes system. ```github.com/kubernetes/kubernetes/pkg/apis/apps/validation/validation.go func ValidateDeployment(obj *apps.Deployment, opts apivalidation.PodValidationOptions) field.ErrorList { allErrs := apivalidation.ValidateObjectMeta(&obj.ObjectMeta, true, ValidateDeploymentName, field.NewPath("metadata")) allErrs = append(allErrs, ValidateDeploymentSpec(&obj.Spec, field.NewPath("spec"), opts)...) return allErrs } ```
  3. CotEditor ͔Βͷ LLM ݺͼग़͠ • CotEditor (macOS ༻ΤσΟλ) ʹೖྗͨ͠಺༰ Λͦͷ··ϓϩϯϓτʹͯ͠

    LLM Λݺͼग़͢ • ΩʔϘʔυγϣʔτΧοτͰ຋༁΍ςΩετͷ ੔ܗͳͲ͕࣮ߦͰ͖Δͷ͸ศར • CotEditor ଆͷ੍໿ͰετϦʔϛϯάදࣔͰ͖ ͣɺ·ͨಡΈࠐΈதͷ UI ͷදࣔ΋೉͍͠ͷͰ ଴͕ͪ࣌ؒ௕͘ײͯ͡͠·͏
  4. ϢʔβʔͷߦಈΛݩʹಈ࡞͢ΔΤʔδΣϯτ • ϒϥ΢βͷϖʔδભҠͳͲΛτϦΨʔʹ LLM Λಈ࡞ͤ͞Δ࣮ݧ • ྫ͑͹ arxiv.org Λ։͘ͱɺͦͷϖʔδͷ࿦จΛղઆͯ͘͠ΕͨΓ͢Δ •

    ҰఆศརͰ͸͋Δ͕ɺߦಈΑΓ΋ LLM ͷग़ྗͷํ͕஗͍ͷͰ͍ͭग़ྗΛ଴ͬͯ͠·͏ • τϦΨʔͱͦͷΞΫγϣϯΛ૿΍͍ͯ͘͠ͱ໘നͦ͏ͳ༧ײ͸͍ͯ͠Δ