Chatbot: catch the PIF question when nobody says "PIF", and stop inventing references
Follow-on to the risk rewrite. Two gaps it exposed. Members ask this without the word PIF: "should I fund their first package", "can I buy it for them", "can I front someone the $20". Those were falling through to the AI, which answered reasonably but told the member to "read the full warning on your training page" - a page section that does not exist and that they would go looking for. The pattern now also matches a paying verb plus an explicit for-someone-else phrase, so these get the full canned answer with the risk in it. It deliberately needs BOTH halves: "which package should I buy" must not be stolen. The prompt now forbids sending anyone to a warning, guide or page section that is not in the PAGES list, and requires plain ASCII (the model was emitting non-breaking hyphens in "Wi-Fi"). Fixed two first-match-wins routing bugs, one of them mine from the previous commit: "what do I get for buying a package" was returning the commission split, because I had widened the earnings pattern to "what do I get" when it should only ever have been "what do I get paid". And "should I buy the $20 package" previously matched nothing at all and burned an AI call on a question we have a written answer for. CANNED is an ordered list, so any pattern edit can silently steal a neighbour. The suite now pins a 19-case routing table across PIF, price, earnings and the tank, so the next person to widen a regex finds out immediately. qa/chatbot-parse.mjs is 35 assertions. qa/run.sh member: 0 bugs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+9
-3
@@ -30,7 +30,7 @@ const CANNED = [
|
|||||||
a: 'There are no withdrawals here, ever. The contract pays your share straight to your own wallet in the same transaction as the purchase. Nothing to request, nothing to wait on.' },
|
a: 'There are no withdrawals here, ever. The contract pays your share straight to your own wallet in the same transaction as the purchase. Nothing to request, nothing to wait on.' },
|
||||||
// "how much do I earn" used to fall through to the PRICE answer below, because that one
|
// "how much do I earn" used to fall through to the PRICE answer below, because that one
|
||||||
// matches "how much do" and this one only caught "how much earn" (Marty, 2026-09-17).
|
// matches "how much do" and this one only caught "how much earn" (Marty, 2026-09-17).
|
||||||
{ re: /(how (much|do i) earn|how much (do|can|will|would|could|might) (i|we|you|they) (earn|make|get)|what (do|would|will) i (earn|make|get)|commission|percent|split)/i,
|
{ re: /(how (much|do i) earn|how much (do|can|will|would|could|might) (i|we|you|they) (earn|make|get)|what (do|would|will) i (earn|make|get paid)|commission|percent|split)/i,
|
||||||
a: 'Every package splits the same way: 50 percent to the direct sponsor, 20 percent to level 2, 10 percent to level 3, 20 percent to the platform. Those numbers are constants in the contract and cannot be changed. The package ladder is on the home page. No income is promised; nobody earns unless real ad buying happens.' },
|
a: 'Every package splits the same way: 50 percent to the direct sponsor, 20 percent to level 2, 10 percent to level 3, 20 percent to the platform. Those numbers are constants in the contract and cannot be changed. The package ladder is on the home page. No income is promised; nobody earns unless real ad buying happens.' },
|
||||||
{ re: /(balance (went|going|keeps going) down|credits? (disappear|missing|gone|dropping|went down|ticking)|why (is|did) my (balance|credits)|in campaigns|set aside|reserved credits|available to spend)/i,
|
{ re: /(balance (went|going|keeps going) down|credits? (disappear|missing|gone|dropping|went down|ticking)|why (is|did) my (balance|credits)|in campaigns|set aside|reserved credits|available to spend)/i,
|
||||||
a: 'One rule: your balance is what is NOT committed to a live campaign. When you start a campaign its whole budget is set aside right then (earned credits first, then purchased), so your Available number drops once and then sits still while the ad runs. The budget spends down inside that campaign in Members > Campaigns, where you can see delivered views, network views and what is left. The dashboard shows Purchased available, Earned available and In live campaigns as three separate numbers; a paused campaign keeps its unspent budget set aside so it can resume. Nothing is lost when a balance reads low while a campaign is live. Purchased credits live on the blockchain; if we ever refund or credit purchased money it shows under Purchased as "credited to you" and spends like a purchase, login ads included. Earned credits fund every format except login ads. Two formats are flat buys paid in full when booked: featured links (sold by the day) and verified-visit packs. Adding credits to a featured link does nothing, so its row offers Extend run instead, which books more days at the daily rate; a visit pack offers Buy more visits. Every credit that comes in or goes out is listed with its reason under Members > Campaigns > Credit activity (also linked from Earn credits): sign-in bonus, daily claim, video watched, verified visit, campaign buys, views delivered per day, grants and refunds. Check it before assuming credits went missing.' },
|
a: 'One rule: your balance is what is NOT committed to a live campaign. When you start a campaign its whole budget is set aside right then (earned credits first, then purchased), so your Available number drops once and then sits still while the ad runs. The budget spends down inside that campaign in Members > Campaigns, where you can see delivered views, network views and what is left. The dashboard shows Purchased available, Earned available and In live campaigns as three separate numbers; a paused campaign keeps its unspent budget set aside so it can resume. Nothing is lost when a balance reads low while a campaign is live. Purchased credits live on the blockchain; if we ever refund or credit purchased money it shows under Purchased as "credited to you" and spends like a purchase, login ads included. Earned credits fund every format except login ads. Two formats are flat buys paid in full when booked: featured links (sold by the day) and verified-visit packs. Adding credits to a featured link does nothing, so its row offers Extend run instead, which books more days at the daily rate; a visit pack offers Buy more visits. Every credit that comes in or goes out is listed with its reason under Members > Campaigns > Credit activity (also linked from Earn credits): sign-in bonus, daily claim, video watched, verified visit, campaign buys, views delivered per day, grants and refunds. Check it before assuming credits went missing.' },
|
||||||
@@ -41,7 +41,11 @@ const CANNED = [
|
|||||||
// PIF + the holding tank. Asked together often ("should I pif someone from the tank"),
|
// PIF + the holding tank. Asked together often ("should I pif someone from the tank"),
|
||||||
// and the honest answer is that the order matters: you cannot PIF someone still in the
|
// and the honest answer is that the order matters: you cannot PIF someone still in the
|
||||||
// tank. Canned so it never depends on the AI provider being up (Marty, 2026-09-17).
|
// tank. Canned so it never depends on the AI provider being up (Marty, 2026-09-17).
|
||||||
{ re: /\b(pif|p\.i\.f|pay(ing)? it forward|paid it forward|gift (them|him|her|someone|a member)|send (them|him|her) (some )?pol)\b/i,
|
// The second alternation catches the same question asked without the word PIF
|
||||||
|
// ("should I fund their first package", "can I buy it for them"). It needs BOTH a
|
||||||
|
// paying verb AND an explicit for-someone-else phrase, so ordinary pricing questions
|
||||||
|
// like "which package should I buy" are not stolen (Marty, 2026-09-17).
|
||||||
|
{ re: /\b(pif|p\.i\.f|pay(ing)? it forward|paid it forward|gift (them|him|her|someone|a member)|send (them|him|her) (some )?pol)\b|\b(fund(ing)?|pay(ing)? for|cover(ing)?|buy(ing)?|purchas(e|ing)|front(ing)?|spot)\b[^.?!]{0,50}\b(for (them|him|her|someone|a member|a new member|my (referral|downline|member))|(their|his|her|someone'?s|a member'?s) (first )?(package|starter|activation|\$?20))\b|\b(front|spot|lend|loan|advance|stake|grubstake)\b[^.?!]{0,30}\b(them|him|her|someone|a member|a new member|my (referral|downline|member))\b/i,
|
||||||
a: 'PIF is a gift you send from your own wallet, and the site never touches the money. It only appears on your own free referrals and on members you have adopted, and only once they have linked a wallet, so you cannot PIF somebody who is still sitting in the holding tank. The order is: adopt them from Members > My line > Holding tank, get them to link a wallet on their Wallet tab, then the PIF button shows up, you enter an amount and your own wallet app opens with their address already filled in. Now the part that matters most: do not send anything until you have actually talked to that person and they have told you they will use it. Once that POL leaves your wallet it is gone, there is no refund, no chargeback and nothing we can do to pull it back, because the money goes straight from your wallet to theirs and never touches us. The gift is theirs to keep whatever they do with it, so they can go quiet, spend it on something else, or never sign in again, and none of that is against any rule. Someone in the holding tank joined with nobody working with them and may never have engaged at all, which makes an unanswered PIF the easiest money on this site to lose. Get a reply, get a clear commitment that they are going to buy and build, see that they have linked a wallet and are actually active, and only then decide. If they do buy a $20 package the contract pays you 50 percent as their sponsor and they become one of your qualifying buyers, so a gift that works costs you about half; a gift to somebody who never answers costs you all of it. Never gift money you need, never borrow to do it, and treat every PIF as money you are content to lose.' },
|
a: 'PIF is a gift you send from your own wallet, and the site never touches the money. It only appears on your own free referrals and on members you have adopted, and only once they have linked a wallet, so you cannot PIF somebody who is still sitting in the holding tank. The order is: adopt them from Members > My line > Holding tank, get them to link a wallet on their Wallet tab, then the PIF button shows up, you enter an amount and your own wallet app opens with their address already filled in. Now the part that matters most: do not send anything until you have actually talked to that person and they have told you they will use it. Once that POL leaves your wallet it is gone, there is no refund, no chargeback and nothing we can do to pull it back, because the money goes straight from your wallet to theirs and never touches us. The gift is theirs to keep whatever they do with it, so they can go quiet, spend it on something else, or never sign in again, and none of that is against any rule. Someone in the holding tank joined with nobody working with them and may never have engaged at all, which makes an unanswered PIF the easiest money on this site to lose. Get a reply, get a clear commitment that they are going to buy and build, see that they have linked a wallet and are actually active, and only then decide. If they do buy a $20 package the contract pays you 50 percent as their sponsor and they become one of your qualifying buyers, so a gift that works costs you about half; a gift to somebody who never answers costs you all of it. Never gift money you need, never borrow to do it, and treat every PIF as money you are content to lose.' },
|
||||||
{ re: /(holding tank|adopt(ing|ion|ed)? (a |an |from|someone|member)|orphan(ed)? member|no sponsor|unsponsored|release to tank)/i,
|
{ re: /(holding tank|adopt(ing|ion|ed)? (a |an |from|someone|member)|orphan(ed)? member|no sponsor|unsponsored|release to tank)/i,
|
||||||
a: 'The holding tank is where free members who joined without a sponsor wait, and anyone can be picked up first come. To adopt you need payouts switched on and your own $20 or larger package bought; then open Members > My line > Holding tank. You can hold 2 open adoptions at a time and each one runs for 7 days, and if that person never links a wallet or buys they drop back into the tank. Adopting sets you as their sponsor, opens a chat and emails them, and their first purchase binds to you on the chain. You can also release one of your own free referrals into the tank for somebody else to work with, though not one you adopted less than 3 days ago. A member can be adopted twice in their lifetime at most, so an adoption you drop still costs them one of those chances.' },
|
a: 'The holding tank is where free members who joined without a sponsor wait, and anyone can be picked up first come. To adopt you need payouts switched on and your own $20 or larger package bought; then open Members > My line > Holding tank. You can hold 2 open adoptions at a time and each one runs for 7 days, and if that person never links a wallet or buys they drop back into the tank. Adopting sets you as their sponsor, opens a chat and emails them, and their first purchase binds to you on the chain. You can also release one of your own free referrals into the tank for somebody else to work with, though not one you adopted less than 3 days ago. A member can be adopted twice in their lifetime at most, so an adoption you drop still costs them one of those chances.' },
|
||||||
@@ -75,7 +79,7 @@ const CANNED = [
|
|||||||
a: 'A verified-visit pack sends real members to your site: each one opens it in a new tab, stays at least 8 seconds and passes a check, and no member counts twice. It costs 3 credits per visit, minimum 20 visits, paid in full when you create it, then it fills over time (each member can do at most 20 visits a day). The row shows "N of M visits delivered" and Buy more visits adds to the pack. Members earn 1 credit per verified visit.' },
|
a: 'A verified-visit pack sends real members to your site: each one opens it in a new tab, stays at least 8 seconds and passes a check, and no member counts twice. It costs 3 credits per visit, minimum 20 visits, paid in full when you create it, then it fills over time (each member can do at most 20 visits a day). The row shows "N of M visits delivered" and Buy more visits adds to the pack. Members earn 1 credit per verified visit.' },
|
||||||
{ re: /(overview video|four.minute|4.minute|what is (this|instantadpay)|explain (the )?platform|how does (this|it) work)/i,
|
{ re: /(overview video|four.minute|4.minute|what is (this|instantadpay)|explain (the )?platform|how does (this|it) work)/i,
|
||||||
a: 'The quickest answer is the four-minute overview video: it is the first card on Members > Training and on the home page at https://instantadpay.com/#overview-video. It covers what the platform is, what free members get, the campaign formats, how the contract splits every purchase, wallet and payouts, Qualified Start, the payment trace and the tools for building a line.' },
|
a: 'The quickest answer is the four-minute overview video: it is the first card on Members > Training and on the home page at https://instantadpay.com/#overview-video. It covers what the platform is, what free members get, the campaign formats, how the contract splits every purchase, wallet and payouts, Qualified Start, the payment trace and the tools for building a line.' },
|
||||||
{ re: /(\b(price|prices|pricing|costs?)\b|how much (is|are|does|do)|package (price|cost|size)|which package|what packages|what do i get|what am i buying)/i,
|
{ re: /(\b(price|prices|pricing|costs?)\b|how much (is|are|does|do)|package (price|cost|size)|which package|what packages|what do i get|what am i buying|should i (buy|get|start with|go with)|worth (buying|getting|it to buy))/i,
|
||||||
a: 'Five packages, priced in dollars and settled in POL at the live rate when you buy: Micro $5 for 500 credits, Activation $20 for 2,000, Builder $50 for 5,500, Growth $100 for 12,000, Leader $250 for 32,500. One credit is one cent of ad delivery in any format. Packages of $20 or more count toward qualification, and every purchase is split by the contract in the same transaction: 50 percent to your sponsor, 20 to level 2, 10 to level 3, 20 to the platform. The live POL prices are on the home page and the Buy packages tab.' },
|
a: 'Five packages, priced in dollars and settled in POL at the live rate when you buy: Micro $5 for 500 credits, Activation $20 for 2,000, Builder $50 for 5,500, Growth $100 for 12,000, Leader $250 for 32,500. One credit is one cent of ad delivery in any format. Packages of $20 or more count toward qualification, and every purchase is split by the contract in the same transaction: 50 percent to your sponsor, 20 to level 2, 10 to level 3, 20 to the platform. The live POL prices are on the home page and the Buy packages tab.' },
|
||||||
{ re: /(what (is|are) (a |an )?(ad )?credits?|credits? (worth|value|mean)|one credit|impression|cpm)/i,
|
{ re: /(what (is|are) (a |an )?(ad )?credits?|credits? (worth|value|mean)|one credit|impression|cpm)/i,
|
||||||
a: 'Packages mint ad credits on-chain, and every new member also gets a small batch of welcome credits just for joining. One credit is one cent of ad delivery: banners and text ads (also syndicated to the wider network), full-screen login ads, watch-to-earn video ads, solo ads into member inboxes, featured links in the strip on every Overview, and verified-visit packs, all managed from Members > Campaigns. Only your campaigns can spend your credits.' },
|
a: 'Packages mint ad credits on-chain, and every new member also gets a small batch of welcome credits just for joining. One credit is one cent of ad delivery: banners and text ads (also syndicated to the wider network), full-screen login ads, watch-to-earn video ads, solo ads into member inboxes, featured links in the strip on every Overview, and verified-visit packs, all managed from Members > Campaigns. Only your campaigns can spend your credits.' },
|
||||||
@@ -157,6 +161,8 @@ PAGES (the ONLY addresses that exist; never invent others): home https://instant
|
|||||||
|
|
||||||
RULES:
|
RULES:
|
||||||
- 1 to 4 sentences, plain text, no markdown, include full URLs when pointing at a page, and only URLs from the PAGES list above.
|
- 1 to 4 sentences, plain text, no markdown, include full URLs when pointing at a page, and only URLs from the PAGES list above.
|
||||||
|
- Never send someone to a warning, notice, guide, document or page section that is not named above. Saying "read the full warning on your training page" invents something that does not exist and the member will go looking for it. If the answer is not on a page in the PAGES list, give the answer here or say you are not sure and point to /contract, the ledger, or their sponsor.
|
||||||
|
- Plain ASCII only: a normal hyphen, never a non-breaking hyphen, and no smart quotes.
|
||||||
- NEVER promise or estimate income. This is an advertising service with a referral program, never an investment. Be honest about risk: crypto transactions are irreversible, nobody earns unless real ad purchases happen.
|
- NEVER promise or estimate income. This is an advertising service with a referral program, never an investment. Be honest about risk: crypto transactions are irreversible, nobody earns unless real ad purchases happen.
|
||||||
- No em dashes. If you do not know, say so and point to /contract or the ledger.`;
|
- No em dashes. If you do not know, say so and point to /contract or the ledger.`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,34 @@ t('it gives the honest arithmetic both ways', /costs you about half/.test(pif) &
|
|||||||
t('it says never gift money you need and never borrow', /never gift money you need, never borrow/i.test(pif));
|
t('it says never gift money you need and never borrow', /never gift money you need, never borrow/i.test(pif));
|
||||||
t('it never sells PIF as a tactic', !/you should (definitely |really )?pif/i.test(pif));
|
t('it never sells PIF as a tactic', !/you should (definitely |really )?pif/i.test(pif));
|
||||||
|
|
||||||
|
// 8. ROUTING. CANNED is first-match-wins, so widening any pattern can silently steal a
|
||||||
|
// neighbour. Both of these already happened: "how much do I earn" returned the price
|
||||||
|
// ladder, and "what do I get for buying a package" returned the commission split. Every
|
||||||
|
// pattern edit must keep this table green.
|
||||||
|
const WANT = {
|
||||||
|
PIF: /PIF is a gift/,
|
||||||
|
PRICE: /Five packages, priced/,
|
||||||
|
EARN: /Every package splits the same way/,
|
||||||
|
TANK: /The holding tank is where free members/
|
||||||
|
};
|
||||||
|
const ROUTES = [
|
||||||
|
['PIF', 'should I pif someone from the holding tank'], ['PIF', 'what is pif'],
|
||||||
|
['PIF', 'should i pay it forward'], ['PIF', 'can I front someone the $20'],
|
||||||
|
['PIF', 'should I spot them the money'], ['PIF', 'should I pay for their first package'],
|
||||||
|
['PIF', 'can I just buy the package for someone in my downline who wont respond'],
|
||||||
|
['PIF', 'is it smart to fund a new members first package for them'],
|
||||||
|
['PRICE', 'which package should i buy'], ['PRICE', 'how much is the starter package'],
|
||||||
|
['PRICE', 'should I buy the $20 package'], ['PRICE', 'what do I get for buying a package'],
|
||||||
|
['PRICE', 'how much does it cost'],
|
||||||
|
['EARN', 'how much do I earn'], ['EARN', 'how much can i make'],
|
||||||
|
['EARN', 'what will i get paid'], ['EARN', 'what is the commission'],
|
||||||
|
['TANK', 'how does the holding tank work'], ['TANK', 'can I adopt someone from the tank']
|
||||||
|
];
|
||||||
|
for (const [want, q] of ROUTES) {
|
||||||
|
const reply = await ask(q);
|
||||||
|
t('routes to ' + want + ': "' + q + '"', WANT[want].test(reply), String(reply).slice(0, 55));
|
||||||
|
}
|
||||||
|
|
||||||
https.request = realRequest;
|
https.request = realRequest;
|
||||||
srv.close();
|
srv.close();
|
||||||
console.log('PASS ' + ok.length);
|
console.log('PASS ' + ok.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user