# Les modules d'IA ont soudainement cessé de fonctionner

**URL:** <https://meta.discourse.org/t/ai-modules-suddenly-stopped-working/295232>\
**Category:** Bug\
**Tags:** ai\
**Created:** [Février 13, 2024, 5:23 UTC](https://meta.discourse.org/t/ai-modules-suddenly-stopped-working/295232 "2024-02-13T17:23:41Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Février 28, 2024, 2:58 UTC](https://meta.discourse.org/t/ai-modules-suddenly-stopped-working/295232/7 "2024-02-28T14:58:08Z")

</div>

Il semble que l’utilisateur de la base de données sur les installations auto-hébergées manque des autorisations pour définir ceci. Une meilleure façon de définir ceci est suivie en amont, attendons un correctif là-bas un peu avant d’essayer de le gérer

> <https://github.com/pgvector/pgvector/issues/235#issue-1860464316>
>
> \## Use cases
> 
> There are cases where a user wants to set a default search value… (e.g. \`ivfflat.probes\`, \`hnsw.ef\_search\`) value on a per-index basis, for example: 
> 
> 1. Data is partitioned across multiple tables (integer-based partition key, not related to vector) with indexes on each table. This avoids setting the value on a per-query basis
> 2. User has a single index, but doesn't want to set the search values on a per-query basis
>  
> \## Proposal
> 
> The proposal is to add new index options on the index AMs:
> 
> 1. \`ivfflat\`: \`default\_probes\` (default: \`NULL\`)
> 1. \`hnsw\`: \`default\_ef\_search\` (default: \`NULL\`)
> 
> PostgreSQL tracks when a \[GUC is changed\]\[1\]. For this case, we can use the \`PGC\_S\_SESSION\` indicator to determine that GUC is changed in the database sessions and therefore we do not need to consult the index option.
>  
> The proposal would then use this heuristic:
>  
> \`\`\`
> if default\_probes/default\_ef\_search is NULL
> use value from \`ivfflat.probes\`/ \`hnsw.ef\_search\`
> else
> if \`ivfflat.probes\`/\`hnsw.ef\_search\` source is PGC\_S\_SESSION, use value of \`ivfflat.probes\`/\`hnsw.ef\_search\`
> else use value from \`default\_probes\`/\`default\_ef\_search\`
> \`\`\`
> 
> \## Alternatives
> 
> With additional work, we could set "smarter" automatic defaults for \`ivfflat.probes\`/\`hnsw.ef\_search\`, but folks may still want to set their own index-specific defaults based on the above use cases.
> 
> Seeking feedback on this proposal.
>  
> \[1\]: https://github.com/postgres/postgres/blob/master/src/include/utils/guc.h#L78-L123

---

_[View the full topic](https://meta.discourse.org/t/ai-modules-suddenly-stopped-working/295232)._
