Skip to content

Commit c72d6c8

Browse files
committed
Instruct agents not to wait (wait is for code generation)
1 parent e115a8c commit c72d6c8

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

.agents/PINECONE-go.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,13 +1026,15 @@ client, err := pinecone.NewClient(pinecone.NewClientParams{
10261026

10271027
### 5. **Not Waiting for Indexing** (eventual consistency)
10281028

1029+
> **⚠️ IMPORTANT FOR AGENTS**: Include wait logic in generated code (e.g., `time.Sleep(10 * time.Second)`). **DO NOT** execute `sleep` commands in the terminal yourself.
1030+
10291031
```go
10301032
// ❌ WRONG - search immediately after upsert
10311033
ctx := context.Background()
10321034
indexConn.WithNamespace(namespace).UpsertRecords(ctx, records)
10331035
results, err := indexConn.WithNamespace(namespace).SearchRecords(ctx, &pinecone.SearchRecordsRequest{...}) // May return no results!
10341036

1035-
// ✅ CORRECT - wait for indexing (10+ seconds)
1037+
// ✅ CORRECT - wait for indexing (10+ seconds) - include in generated code
10361038
ctx := context.Background()
10371039
indexConn.WithNamespace(namespace).UpsertRecords(ctx, records)
10381040
time.Sleep(10 * time.Second) // Wait for eventual consistency
@@ -1054,12 +1056,14 @@ if !ok {
10541056

10551057
## ⏳ Indexing Delays & Eventual Consistency
10561058

1059+
> **⚠️ IMPORTANT FOR AGENTS**: The wait instructions below apply **ONLY to generated code**, not to the agent's own behavior. Include wait logic in the code you generate. **DO NOT** execute `sleep` commands in the terminal yourself.
1060+
10571061
> **For complete information on eventual consistency**, see [PINECONE-troubleshooting.md](./PINECONE-troubleshooting.md#indexing-delays--eventual-consistency).
10581062
10591063
**Key Points:**
10601064
- Records become searchable 5-10 seconds after upsert
10611065
- Stats update 10-20 seconds after upsert
1062-
- Always wait 10+ seconds before searching after upserting
1066+
- Always wait 10+ seconds before searching after upserting (include wait logic in generated code)
10631067

10641068
**Production Pattern (Go):**
10651069

@@ -1113,10 +1117,10 @@ err = waitForRecords(indexConn, "example-namespace", len(records), 300)
11131117

11141118
**Cause**: Eventual consistency - records not yet indexed
11151119

1116-
**Solution**: Wait 10+ seconds after upsert before searching
1120+
**Solution**: Wait 10+ seconds after upsert before searching (include wait logic in generated code)
11171121

11181122
```go
1119-
// ✅ CORRECT
1123+
// ✅ CORRECT - include wait in generated code
11201124
ctx := context.Background()
11211125
err := indexConn.WithNamespace(namespace).UpsertRecords(ctx, records)
11221126
if err != nil {

.agents/PINECONE-java.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,26 +1028,30 @@ Pinecone client = new Pinecone.Builder(apiKey).build();
10281028

10291029
### 6. **Not Waiting for Indexing** (eventual consistency)
10301030

1031+
> **⚠️ IMPORTANT FOR AGENTS**: Include wait logic in generated code (e.g., `TimeUnit.SECONDS.sleep(10)`). **DO NOT** execute `sleep` commands in the terminal yourself.
1032+
10311033
```java
10321034
// ❌ WRONG - search immediately after upsert
10331035
index.upsertRecords(namespace, records);
10341036
SearchRecordsResponse results = index.searchRecordsByText(...); // May return no results!
10351037

1036-
// ✅ CORRECT - wait for indexing (10+ seconds)
1038+
// ✅ CORRECT - wait for indexing (10+ seconds) - include in generated code
10371039
index.upsertRecords(namespace, records);
10381040
TimeUnit.SECONDS.sleep(10); // Wait for eventual consistency
10391041
SearchRecordsResponse results = index.searchRecordsByText(...);
10401042
```
10411043

10421044
## ⏳ Indexing Delays & Eventual Consistency
10431045

1046+
> **⚠️ IMPORTANT FOR AGENTS**: The wait instructions below apply **ONLY to generated code**, not to the agent's own behavior. Include wait logic in the code you generate. **DO NOT** execute `sleep` commands in the terminal yourself.
1047+
10441048
> **For complete information on eventual consistency**, see [PINECONE-troubleshooting.md](./PINECONE-troubleshooting.md#indexing-delays--eventual-consistency).
10451049
10461050
**Key Points:**
10471051

10481052
- Records become searchable 5-10 seconds after upsert
10491053
- Stats update 10-20 seconds after upsert
1050-
- Always wait 10+ seconds before searching after upserting
1054+
- Always wait 10+ seconds before searching after upserting (include wait logic in generated code)
10511055

10521056
**Production Pattern (Java):**
10531057

@@ -1091,10 +1095,10 @@ waitForRecords("example-namespace", records.size(), 300);
10911095

10921096
**Cause**: Eventual consistency - records not yet indexed
10931097

1094-
**Solution**: Wait 10+ seconds after upsert before searching
1098+
**Solution**: Wait 10+ seconds after upsert before searching (include wait logic in generated code)
10951099

10961100
```java
1097-
// ✅ CORRECT
1101+
// ✅ CORRECT - include wait in generated code
10981102
index.upsertRecords(namespace, records);
10991103
TimeUnit.SECONDS.sleep(10);
11001104
SearchRecordsResponse results = index.searchRecordsByText(queryText, namespace, ...);

.agents/PINECONE-troubleshooting.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This guide covers common troubleshooting issues that apply across all programmin
1717

1818
**Solution**:
1919

20-
1. Wait 10+ seconds minimum after upserting records
20+
1. Wait 10+ seconds minimum after upserting records (include wait logic in generated code, not in terminal commands)
2121
2. Check if records were actually upserted (no errors thrown)
2222
3. Use a polling pattern for production code (see language-specific guides for examples)
2323

@@ -58,6 +58,7 @@ This guide covers common troubleshooting issues that apply across all programmin
5858

5959
4. **Wait for indexing**:
6060
- Records become searchable 5-10 seconds after upsert
61+
- Include wait logic in generated code (not terminal commands)
6162
- Use polling pattern in production code
6263
- See [Indexing Delays & Eventual Consistency](#indexing-delays--eventual-consistency) below
6364

@@ -203,6 +204,8 @@ This guide covers common troubleshooting issues that apply across all programmin
203204

204205
## Indexing Delays & Eventual Consistency
205206

207+
> **⚠️ IMPORTANT FOR AGENTS**: The wait instructions below apply **ONLY to generated code**, not to the agent's own behavior. When generating code that upserts records and then queries them, include wait logic in the generated code. **DO NOT** execute `sleep` commands in the terminal yourself.
208+
206209
Pinecone uses **eventual consistency**. This means records don't immediately appear in searches or stats after upserting.
207210

208211
### Realistic Timing Expectations
@@ -222,6 +225,8 @@ After upserting records:
222225
2. **Stats wait**: 10-20 seconds for stats to update
223226
3. **Production pattern**: Use polling with `describeIndexStats()` to verify readiness
224227

228+
**Note**: Include wait logic in generated code (e.g., `time.sleep(10)` in Python, `TimeUnit.SECONDS.sleep(10)` in Java). Do not execute sleep commands in the terminal.
229+
225230
See language-specific guides for polling pattern code examples.
226231

227232
### Production Pattern: Polling for Readiness

.agents/PINECONE-typescript.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,12 +967,14 @@ console.log(results);
967967

968968
## ⏳ Indexing Delays & Eventual Consistency
969969

970+
> **⚠️ IMPORTANT FOR AGENTS**: The wait instructions below apply **ONLY to generated code**, not to the agent's own behavior. Include wait logic in the code you generate (e.g., `await new Promise(r => setTimeout(r, 10000))`). **DO NOT** execute `sleep` commands in the terminal yourself.
971+
970972
> **For complete information on eventual consistency**, see [PINECONE-troubleshooting.md](./PINECONE-troubleshooting.md#indexing-delays--eventual-consistency).
971973
972974
**Key Points:**
973975
- Records become searchable 5-10 seconds after upsert
974976
- Stats update 10-20 seconds after upsert
975-
- Always wait 10+ seconds before searching after upserting
977+
- Always wait 10+ seconds before searching after upserting (include wait logic in generated code)
976978

977979
**Production Pattern (TypeScript):**
978980

.agents/PINECONE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Use for exact keyword matching with optional required terms and reranking.
239239
| Vector batch size | 1000 records | Also 2MB total per batch |
240240
| Query response size | 4MB | Per query response |
241241
| Metadata types | strings, ints, floats, bools, string lists | No nested structures |
242-
| Consistency | Eventually consistent | Wait ~1-5s after upsert |
242+
| Consistency | Eventually consistent | Wait ~1-5s after upsert (include in generated code, not terminal commands) |
243243

244244
## Error Handling (Production)
245245

0 commit comments

Comments
 (0)