# Use an LLM to help build on ICP \[Feedback appreciated!\]

**URL:** <https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804>\
**Category:** Developers\
**Created:** [October 16, 2023, 6:39pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804 "2023-10-16T18:39:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 16, 2023, 6:39pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/1 "2023-10-16T18:39:31Z")

</div>

## TLDR

**The ICP developer docs (trained on the wiki, this forum, and other docs) now have an LLM to help developers build ICP dapps (and answer other questions).**

## Summary

Ahoy Folks,

This morning the ICP developer docs website released an LLM chat widget on the developer docs:. You can see it here: [ICP developer docs](https://internetcomputer.org/docs/current/home).

Many folks have worked on updating documentation, unblocking developers, creating examples, and a common. piece of feedback we have received is that it is still not quite easy enough, so we wanted to give developers a better experience.

## FAQs

### 1. What is this LLM trained on?

It is trained on the following:

- ICP Wiki
- ICP developer docs
- ICP developer forum

and fine tuned manually as folks give us feedback.

### 2. Where does the LLM live?

The LLM is powered by the nice folks at [Kapa.ai](https://www.kapa.ai/). They made it easy for us to ingest the data (all of which is public) and train on it.

This is an important note because we should be clear that while the ICP website is hosted on-chain… the LLM is hosted off-chain on Kapa.ai. Dont want folks to get the wrong impression about where the LLM is hosted.

### 3. If I find an incorrect answer or want to recommend something, where can i give feedback?

You can give feedback on this very forum, but you can also use discord where folks like @domwoe or @anon74414410 usually hang out on.

### 4. What kind of questions should I ask it?

Anything. Here are some examples:

1. what is a candid file?
2. how do I start building stuff?
3. What is the maximum memory of a canister?
4. What is the expiration time of an ingress message?

## Kudos

Special props to @dfx-json and @domwoe for getting this across the line.

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 16, 2023, 6:42pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/2 "2023-10-16T18:42:06Z")

</div>

![ICP kapa](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/0/0188ca2ca58f002b8abc23ed18a055030e6c07db.jpeg)

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [October 16, 2023, 7:35pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/3 "2023-10-16T19:35:56Z")

</div>

Did you train it also on The Azle Book, The Kybra Book, and the examples in their repos?

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 16, 2023, 7:51pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/4 "2023-10-16T19:51:33Z")

</div>

No, but that’s a good idea.

We originally started with dev forum and then added dev docs and wiki after. So the tale grew in the telling.

We’ll add those as well. good idea @lastmjs

---

<div class="post-metadata">

**Author:** ![icpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icpp/32/9310_2.png) [@icpp](https://forum.dfinity.org/u/icpp)\
**Post date:** [October 16, 2023, 8:45pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/5 "2023-10-16T20:45:59Z")

</div>

I will try it out. Very cool news!

Can the icpp–pro docs also be added to the training data?

- [https://docs.icpp.world/](https://docs.icpp.world/)

I have three more questions:

- how often is the LLM retrained?
- are you considering to add public code and demo repos?
- which LLM is the basis for the fine tuned LLM?

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 16, 2023, 8:58pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/6 "2023-10-16T20:58:23Z")

</div>

> Can the icpp–pro docs also be added to the training data?

yes, well add it.

> - how often is the LLM retrained?

my understanding is that is every weeks, but manually can be done more. I need to double check this.

> are you considering to add public code and demo repos?

Yes

> which LLM is the basis for the fine tuned LLM?

Kapa.ai, which i believe uses OpenAI (but i also need to double check this)

---

<div class="post-metadata">

**Author:** ![let4be](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/let4be/32/25128_2.png) [@let4be](https://forum.dfinity.org/u/let4be)\
**Post date:** [October 16, 2023, 11:12pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/7 "2023-10-16T23:12:49Z")

</div>

This stuff is RAD. Huge props!

ICP is amaaaaaaazing, I just recently got into the ecosystem and I already don’t know how I lived before without all this 🙂  
Trully the next gen.

---

<div class="post-metadata">

**Author:** ![ajismyid](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ajismyid/32/1291_2.png) [@ajismyid](https://forum.dfinity.org/u/ajismyid)\
**Post date:** [October 17, 2023, 12:53am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/8 "2023-10-17T00:53:51Z")

</div>

![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/3/3226c3e85f38e6bcf506dddde9f6dd93236c32cc.jpeg)  
I’m not sure if the small black widget on the bottom right corner is eye catching enough. It took me several seconds to find the widget on the page.

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 17, 2023, 1:37am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/9 "2023-10-17T01:37:29Z")

</div>

Agreed. Will improve

---

<div class="post-metadata">

**Author:** ![Mercury](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mercury/32/9803_2.png) [@Mercury](https://forum.dfinity.org/u/Mercury)\
**Post date:** [October 17, 2023, 7:35am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/10 "2023-10-17T07:35:21Z")

</div>

Any parallel world projects in Motoko code generation, other than (Microsoft) copilot? I’ve came across only MotokoPilot, not released. Maybe it’s time for the IC community to train its Motoko model?

---

<div class="post-metadata">

**Author:** ![kizzafredrichkibalam](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kizzafredrichkibalam/32/37312_2.png) [@kizzafredrichkibalam](https://forum.dfinity.org/u/kizzafredrichkibalam)\
**Post date:** [October 17, 2023, 12:55pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/11 "2023-10-17T12:55:23Z")

</div>

Thanks Dfinity, One unique thing I love about Dfinity, It has always Innovated amazing things, Chat GPT has always given me wrong Motoko code snippets until I stopped using it. Hope adzle and Kybra are added It will do us well.

---

<div class="post-metadata">

**Author:** ![timiv1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/timiv1/32/13420_2.png) [@timiv1](https://forum.dfinity.org/u/timiv1)\
**Post date:** [October 17, 2023, 1:46pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/12 "2023-10-17T13:46:48Z")

</div>

Greetings,

Being relatively new to this forum, I am thrilled to delve into the ICP ecosystem with the newly launched LLM chat widget on the ICP developer docs website. However, during my interaction with the LLM, I have observed a few areas that could be fine-tuned to deliver an even more enriching user experience:

1. **Chat History Retention** :

2. **Auto-Scrolling During Answer Generation** :

3. **Response Limit** :

4. **Expanded Resource References** :

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 17, 2023, 4:17pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/13 "2023-10-17T16:17:51Z")

</div>

Great feedback. Thank you @timiv1 . let me see what we can do on this.

---

<div class="post-metadata">

**Author:** ![timo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/timo/32/5543_2.png) [@timo](https://forum.dfinity.org/u/timo)\
**Post date:** [October 17, 2023, 5:10pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/14 "2023-10-17T17:10:08Z")

</div>

Can it be trained on this as well? [GitHub - dfinity/examples: Example applications, microservices, and code samples for the Internet Computer](https://github.com/dfinity/examples)

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 17, 2023, 5:31pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/15 "2023-10-17T17:31:48Z")

</div>

Yes. good call Timo. Will add those.

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 17, 2023, 6:57pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/16 "2023-10-17T18:57:10Z")

</div>

Update on adding sources:

## Done:

1. [The Kybra Book - The Kybra Book](https://demergent-labs.github.io/kybra/)
2. [The Azle Book (Release Candidate) - The Azle Book](https://demergent-labs.github.io/azle/)
3. [https://docs.icpp.world/](https://docs.icpp.world/)

## Not currently possible:

1. [GitHub - dfinity/examples: Example applications, microservices, and code samples for the Internet Computer](https://github.com/dfinity/examples) - not possible, only Markdown files are supported for ingesting, not Rust, C, Motoko code.
2. Code examples from Kyra and Axle repos (only from the docs)

---

<div class="post-metadata">

**Author:** ![icpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icpp/32/9310_2.png) [@icpp](https://forum.dfinity.org/u/icpp)\
**Post date:** [October 18, 2023, 1:01am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/17 "2023-10-18T01:01:04Z")

</div>

@diegop ,

Will the system crawl the docs site during training or do we need to provide the full list of pages?

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [October 18, 2023, 1:33am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/18 "2023-10-18T01:33:18Z")

</div>

It crawls all the pages. I manually verified the pages within the domain.

---

<div class="post-metadata">

**Author:** ![icpp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icpp/32/9310_2.png) [@icpp](https://forum.dfinity.org/u/icpp)\
**Post date:** [October 19, 2023, 10:58am UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/19 "2023-10-19T10:58:20Z")

</div>

Wow, it is working great!

I need to learn the details of the HTTP Gateway Protocol, and talking to the LLM to figure it out is so much better than reading the [docs page](https://internetcomputer.org/docs/current/references/http-gateway-protocol-spec) directly. But the LLM does point me to that docs page for reference, so that was great too.

---

<div class="post-metadata">

**Author:** ![josephgranata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/josephgranata/32/21930_2.png) [@josephgranata](https://forum.dfinity.org/u/josephgranata)\
**Post date:** [October 20, 2023, 9:57pm UTC](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804/20 "2023-10-20T21:57:34Z")

</div>

@diegop,

I wanted to personally thank you for leading this effort to add this AI Chat functionality to the documentation site of the IC. It helps a lot to find disparate pieces of information, and has already helped me!

Thanks man, to you and to the folks at Kapa.ai.

Could you share some of the story of how this happened, and what can it ingest? I was wondering if we could add open source relevant material such as the [Rust Programming Guide](https://doc.rust-lang.org/book/), or other Rust related resources that would compliment the good stuff we already have in the IC Docs.

[Next page](https://forum.dfinity.org/t/use-an-llm-to-help-build-on-icp-feedback-appreciated/23804.md?page=2)
