# How to teach things through API

**URL:** <https://discuss.ai.google.dev/t/how-to-teach-things-through-api/1329>\
**Category:** Google AI Studio\
**Tags:** gemini-15, api\
**Created:** [May 7, 2024, 12:12pm UTC](https://discuss.ai.google.dev/t/how-to-teach-things-through-api/1329 "2024-05-07T12:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will\_Maggi](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/will_maggi/32/1372_2.png) [@Will\_Maggi](https://discuss.ai.google.dev/u/Will_Maggi)\
**Post date:** [May 7, 2024, 12:12pm UTC](https://discuss.ai.google.dev/t/how-to-teach-things-through-api/1329/1 "2024-05-07T12:12:32Z")

</div>

Hi, I’d like to know the possibility of teaching AI some instructions about my internal website (like where to find what, etc). By the way, teach all information about my products and services. So my internal customers could find easy information about everything.

---

<div class="post-metadata">

**Author:** ![sps](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/sps/32/143_2.png) [@sps](https://discuss.ai.google.dev/u/sps)\
**Post date:** [May 7, 2024, 12:40pm UTC](https://discuss.ai.google.dev/t/how-to-teach-things-through-api/1329/2 "2024-05-07T12:40:03Z")

</div>

Hi @Will_Maggi

It possible to do that by building a RAG(Retrieval Augmented Generation) pipeline where the semantically similar information can be retrieved and supplied to model as context to reply to users’ queries.

To run the retrieval search, [embeddings](https://ai.google.dev/gemini-api/tutorials/document_search) can be used.

The context length of the Gemini Pro 1.5 is around a million Tokens which means you can even supply quite large pieces of text as context, which is simpler to build and test but can add to cost per run.

---

<div class="post-metadata">

**Author:** ![Will\_Maggi](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/will_maggi/32/1372_2.png) [@Will\_Maggi](https://discuss.ai.google.dev/u/Will_Maggi)\
**Post date:** [May 7, 2024, 1:11pm UTC](https://discuss.ai.google.dev/t/how-to-teach-things-through-api/1329/3 "2024-05-07T13:11:24Z")

</div>

Thx for the answer! I gonna research about this.
