google / generative-ai-docs

Documentation for Google's Gen AI site - including the Gemini API and Gemma
https://ai.google.dev
Apache License 2.0
1.62k stars 568 forks source link

Semantic retriever docs say OAuth is required but this is not completely true #366

Open roschler opened 6 months ago

roschler commented 6 months ago

The main docs page for the semantic retrieval API says that OAuth must be set up to use that API:

https://ai.google.dev/docs/semantic_retriever?hl=en#attributed_question-answering

"The Semantic Retriever API lets you perform semantic search on your own data. Since it's your data, this needs stricter access controls than API keys. Authenticate with OAuth with service accounts or through your user credentials."

This is misleading because if you use the Attributed Question-Answer model, and you use inline grounding attributions, you don't need to authenticate with OAuth. I know this because I am using that powerful technique right now in running code.

Apparently the OAuth requirement is for when you use your own corpora built from your own files, because the API needs access to your private resources to execute the API call. But with inline grounding attributions you are passing in the necessary source material along with the API call, so the API does not need access to your private files. I suggest that the docs be updated to alter that paragraph above and have it point out that OAuth is only required when using your own files, not when using inline grounding attributions.