Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into built-mobile-replay
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanagas committed Oct 4, 2024
2 parents e9186be + 10fbeec commit edeff0c
Show file tree
Hide file tree
Showing 313 changed files with 8,191 additions and 3,981 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,26 @@ Additional environment variables are needed to develop the merch store:
Currently, these environment variables are excluded from Vercel preview builds to disable merch store node creation and speed up build times on non-merch related PRs.
### Dynamic open graph images
To develop a dynamic open graph image:
1. Run `yarn build` with both the `ASHBY_API_KEY` and `GITHUB_API_KEY` set.
1. In `gatsby/onPostBuild.ts`, temporarily comment out the following:
```
if (process.env.VERCEL_GIT_COMMIT_REF !== 'master') return
```
1. Find the generated open graph image in `public/og-images/`
## Contributing
We <3 contributions big and small. In priority order (although everything is appreciated) with the most helpful first:
- Ask a [question in our community](https://posthog.com/questions)
- Submit [bug reports and give us feedback in the app](https://app.posthog.com/home#supportModal)!
- Vote on features or get early access to beta functionality in our [roadmap](https://posthog.com/roadmap)
- Vote on features or get early access to beta functionality in our [roadmap](https://posthog.com/roadmap)
- Open a PR
- Read [our instructions above](#quick-start) on developing PostHog.com locally
- Read [our instructions above](#quick-start) on developing PostHog.com locally
- Read more [detailed instructions in our manual](https://posthog.com/handbook/engineering/posthog-com/developing-the-website)
- For basic edits, go to the file in GitHub and click the edit button (pencil icon)
- Open [an issue](https://github.com/PostHog/posthog.com/issues/new) or [content idea](https://github.com/PostHog/posthog.com/issues/new?assignees=andyvan-ph&labels=content&template=blog-post-idea-template.md&title=%7BContent+type%7D+-+%7Btitle%7D)
202 changes: 202 additions & 0 deletions contents/blog/ai-community-answers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
---
date: 2024-10-03
title: Did you know AI is answering our community questions?
rootPage: /blog
featuredImage: >-
https://res.cloudinary.com/dmukukwp6/image/upload/max_ai_poster_b829564bbf.png
featuredImageType: full
author:
- cory-watilo
category: PostHog news
---

AI. You may have heard of it.

Sure, ChatGPT is pretty cool, but when it comes to AI chatbots that try to replace a human in a product support context, I've generally been underwhelmed. The experience generally isn't great, and I'm often left with more frustration than before I skeptically asked the question in the first place.

But it's not all the fault of LLMs. It also has to do with the available information about a product that an LLM consumes. And for a technical product like PostHog, the documentation has to be extensive enough to answer very nuanced questions. (This is tricky as information is constantly changing and there's always room for improvement!)

As the ~~product owner~~ _totally official_ "webmaster" of PostHog.com, I've contemplated how we can make use of AI to help answer questions... and until now, I've lacked a good solution.

## Why AI chatbots have a bad rap

There are a lot of _"wrong"_ ways to do AI chatbots – and there are many examples of this even before we collectively started using true AI.

How many times have you tried to create a support ticket but then:

- been first prompted to review a list of "related questions" that may solve your issue
- been _blocked_ from submitting until you explicitly confirm that none of the suggested answers are helpful

And now in a world of _actual_ AI, we see a new set of issues – largely centered around LLMs not understanding the question, the context, or straight up hallucinating.

In no world would we want to subject our very technical audience to these types of dreaded experiences.

This isn't to say _all_ AI chatbots are bad. A couple of exceptions come top of mind mainly Intercom and Shopify. But the status quo that the industry has to overcome is the negative connotation of historically bad chatbot interactions.

## Our approach

The reason we've been so cautious to introduce AI is that we're very intentional about earning (and not losing) the trust of our audience. We do this in a handful of ways:

1. We don't use fancy words that don't add actual value
1. We try to be relatable and show a personality
1. We traded in the [value-based sales model](/sales) for a no-BS approach (self-service, fair, usage-based pricing)
1. We avoid gimmicky marketing tactics (like popups and jamming CTAs into every available whitespace)

So for an AI solution to mesh well with our brand's vibe (yes, we're about the vibes), it needs to be accurate and succinct in its replies, and never make up a false answer.

After all, if you interact with an AI chatbot and don't get the answer you're looking for, you're likely to write it off entirely. And that's exactly what I want to avoid.

## Where we decided to implement AI

The most natural place to include an AI chatbot would be in our [docs](/docs). But I was hesitant to start here, as the conversational nature of AI meant we'd lack control over the quality and accuracy of the responses. So I decided to try something different.

Our [community questions](/questions) section is where users can ask questions directly in the docs. And we currently have... a lot of open (unanswered) questions. But because they're posted in a forum-style format, there's no expectation of a live chat experience. And this presented an opportunity...

Today customers may wait hours (or even longer) for a response from a human. **So what if AI could answer _only_ the questions it was highly confident it could answer, then leave the rest for a human?**

Using this approach, AI can _add_ value by instantly responding if it has a high degree of confidence, but it won't _detract_ from the experience if it doesn't have the solution, simply leaving those questions open as they normally would.

## Introducing Inkeep

This whole idea came about from an [Inkeep](https://inkeep.com?utm_source=posthog) ad on LinkedIn – which is incredible to say because I'm generally allergic to ads. But Inkeep's ad spoke to me.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_ad_9b53d43fda.png"
classes="rounded"
alt="Inkeep's LinkedIn ad"
/>

I took the bait, and they quickly set me up with [a custom sandbox](https://share.inkeep.com/posthog/3003538eb7fd) to try them out. They're indexing our docs, tutorials, blog posts, handbook, existing community answers, and even GitHub repos. (This also means it's aware of bug reports, feature requests, and open pull requests - _huge!_)

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_sandbox_4ca8513bf0.png"
classes="rounded"
alt="Inkeep sandbox"
/>

They even themed the sandbox to match our brand. &lt;3

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_email_f22b3b7112.png"
classes="rounded"
alt="Inkeep email"
/>

To vet the quality of the answers, I started copy/pasting unanswered community questions into the sandbox and seeing what Inkeep could produce. And to say I wasn't let down should tell you something. It was good enough to where I was willing to try it out on our real questions.

## How it works

> Inkeep's pre-built library of UI components works great for most companies. But out of the kindness of their hearts, they went the extra mile for us.
**Here's how our setup works:**

1. When a new question is posted, we send it to Inkeep's LLM.
1. Typically within ~20 seconds, we get a response. During this time, we show that we're searching for an answer.
<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_in_progress_5599f03642.png"
classes="rounded"
alt="AI answer in progress"
/>
1. In the response, we get a `confidence` score.

```
const KnownAnswerConfidence = z.enum([
"very_confident",
"somewhat_confident",
"not_confident",
"no_sources",
"other",
]);
```

<p><strong className="text-green">If the confidence score is high enough,</strong> we show the answer to the user, credited to our hedgehog mascot, <TeamMember name="Max AI" photo />.</p>
<p><strong className="text-red">If Inkeep <em>isn't</em> confident in the answer,</strong> we show a message that says we couldn't find an answer, and that a human will appear as soon as possible.</p>

When an AI answer is presented, we show feedback buttons so the original poster can tell us if the answer was helpful. We use this information to improve the quality of the answers.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_review_6a6510b750.png"
classes="rounded"
alt="How's the AI answer?"
/>

## Demo

Here's what it looks like to submit a question and receive an AI answer from Inkeep.

<ProductVideo
videoLight= "https://res.cloudinary.com/dmukukwp6/video/upload/inkeep_demo_71fa820a65.mp4"
alt="Inkeep answers a PostHog question"
classes="rounded shadow-xl"
autoPlay={false}
/>

## How we're tracking feedback

As you can imagine, every time a customer rates a response, we're sending the information into PostHog as a custom event. Along with the event, it sends properties like the sentiment ("helpful" or "not helpful") and the category of the question. (This will help us identify if certain areas of our documentation needs to improve.)

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_event_957c7b340d.png"
classes="rounded bg-light dark:bg-dark"
alt="Feedback event"
/>

Now that this is live, we're monitoring feedback in Slack. PostHog's recently introduced support for [realtime destinations](https://posthog.com/changelog/2024#realtime-destinations-now-in-open-beta) in data pipelines.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_slack_config_b865638953.png"
classes="rounded"
alt="Realtime Slack notification config"
/>

This allowed me to configure notifications when we get feedback about an AI answer.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/inkeep_slack_973620665a.png"
classes="rounded"
alt="Slack notification"
/>

## So how's it working?

Overall, it's working pretty well! In fact, it worked so well [in one case](/questions/autocapture-event-bubbling) that the original poster replied to share his delight.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/positive_reply_1_ce48f0fc3a.png"
classes="rounded"
alt="Customer approved"
/>

In other examples, we were receiving feedback that the answer _wasn't_ helpful. But after reviewing the response, the best way to accurately summarize the bulk of feedback is: "The answer is _correct,_ but I didn't _like_ the answer." (This is usually the case when a feature isn't yet supported and it's not the answer the customer was hoping for.)

This resulted in a lower overall success rate. So we modified the response options to better understand the different reasons why a response might not meet the mark.

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/ai_responses_cc819a5877.png"
classes="rounded"
alt="Response options"
/>

With these additional feedback options, we're able to use it to inform areas for improvement. For example, if someone says, _"I think this is a bug",_ we'll take a closer look. Or if they choose the _"Answer is wrong"_ option, we'll take a look into what might be missing from the documentation.

It's also won over some internal support from developers on the PostHog team:

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/positive_reply_2_90d983c0e5.png"
classes="rounded"
alt="Developer approved"
/>

---

We're still early in our days of exploring AI – and don't worry, AI _is_ coming to the PostHog app when we feel it's ready.

But I couldn't give you a better rationale for a slow rollout than how a colleague explained it to me:

<ProductScreenshot
imageLight = "https://res.cloudinary.com/dmukukwp6/image/upload/anonymous_colleague_ec9787d2ed.png"
classes="rounded"
alt="Anonymous quote"
/>

Hopefully the next time you [ask a question](/questions) in our community, you'll get the answer you're looking for. And even better – if you get it even faster than a human could answer.
2 changes: 1 addition & 1 deletion contents/blog/best-gdpr-compliant-analytics-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ PostHog Cloud is [free to use up to 1 million events per month](/pricing) and 5,

![Plausible Analytics - open source analytics tools](https://res.cloudinary.com/dmukukwp6/image/upload/v1710055416/posthog.com/contents/images/blog/open-source-analytics-tools/plausible-screenshot.png)

[Plausible](https://plausible.io/) is a lightweight alternative to tools such as Google Analytics. It offers an effective way to track simple web metrics, such as page views and the number of unique visitors, but lacks the depth of a full product analytics platform.
[Plausible](/blog/posthog-vs-plausible) is a lightweight alternative to tools such as Google Analytics. It offers an effective way to track simple web metrics, such as page views and the number of unique visitors, but lacks the depth of a full product analytics platform.

Plausible’s lightweight nature does offer several benefits however, such as a small script size which means it has a minimal impact on page performance. This further distinguishes it from the bloat of Google Analytics.

Expand Down
2 changes: 1 addition & 1 deletion contents/blog/best-open-source-analytics-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Metabase is available under a AGPL license. A limited version of the product is

#### What is Plausible Analytics?

[Plausible Analytics](https://plausible.io/) is focused on providing website analytics that don’t infringe on user privacy. That means Plausible doesn’t rely on cookies and is naturally compliant with regulations like GDPR.
[Plausible Analytics](/blog/posthog-vs-plausible) is focused on providing website analytics that don’t infringe on user privacy. That means Plausible doesn’t rely on cookies and is naturally compliant with regulations like GDPR.

Unlike Matomo, Plausible is a very streamlined tool rather than a feature-equivalent Google Analytics alternative. As a result, it's a great fit for smaller teams who prefer ease of use to in-depth reporting, or hobby deployments if you just want basic analytics for a website or blog.

Expand Down
2 changes: 1 addition & 1 deletion contents/blog/ga4-alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ TelemetryDeck makes it easy for app developers to track things like active users
- **GDPR compliance:** <span className="text-green text-lg">✔</span>
- **GA data import:** <span className="text-green text-lg">✔</span>

[Plausible](https://plausible.io/) is a leader in the trend of lightweight, privacy-orientated analytics tools. It's easy to use and doesn't collect any personally identifiable information. This makes it ideal for complying with GDPR, but this comes at the cost of functionality.
[Plausible](/blog/posthog-vs-plausible) is a leader in the trend of lightweight, privacy-orientated analytics tools. It's easy to use and doesn't collect any personally identifiable information. This makes it ideal for complying with GDPR, but this comes at the cost of functionality.

Plausible, and others like it, can only track very basic website metrics like pageviews, session duration, and referrer information. This makes it useless for apps, and significantly less powerful than Google Analytics and other alternatives in this list.

Expand Down
2 changes: 1 addition & 1 deletion contents/blog/how-we-improved-feature-flags-resiliency.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Contrast it with the PostHog interface not loading, where the problem is constra

Further, flags are very sensitive to latency. If it takes 5 seconds for your flags to evaluate, that holds up your customer's application for 5 seconds. You can't wait to load them asynchronously, either, as you need this result to determine what to show. Your business logic depends on the flag.

This is why the [Feature Success team](/teams/feature-success) has spent the last few months making PostHog's feature flags fast and resilient. Our goal was to ensure that:
This is why the [Feature Flags team](/teams/feature-flags) has spent the last few months making PostHog's feature flags fast and resilient. Our goal was to ensure that:

1. Neither the SDKs that query flags, nor the API interface, should go down if the PostHog interface does
2. Latency-sensitive flags resolve in 50ms or less.
Expand Down
2 changes: 1 addition & 1 deletion contents/blog/open-source-telemetry-ethical.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Some users are happy to be tracked personally in return for a great project, but

An easy step is not to use third party software to do this.

We built PostHog for this reason. It means you can grab everything you need to do event-based analytics, designed to track a product's use, on your own infrastructure. You can choose to send or not send personal data to your instance too. Given you've got full access to the code and database, you can also plug in things like Metabase or your data lake if you need them. There are some less product-focused, more website-based analytics libraries that are also pretty cool - Matomo or Plausible are definitely worth a look, depending on your use case.
We built PostHog for this reason. It means you can grab everything you need to do event-based analytics, designed to track a product's use, on your own infrastructure. You can choose to send or not send personal data to your instance too. Given you've got full access to the code and database, you can also plug in things like Metabase or your data lake if you need them. There are some less product-focused, more website-based analytics libraries that are also pretty cool - Matomo or [Plausible](/blog/posthog-vs-plausible) are definitely worth a look, depending on your use case.

There are many third party SaaS tools (Amplitude/Mixpanel/Heap) that can provide tracking, but a project would have to send user data to them to use them, we think hence why they're rarely (ever?) seen in the open source world.

Expand Down
2 changes: 1 addition & 1 deletion contents/blog/posthog-vs-ga4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ With PostHog, it's free to get started, with a generous monthly allowance of eve

### Can I migrate from Google Analytics to PostHog?

Yes, see our [Google Analytics to PostHog migration guide](/migrate/google-analytics) for more details.
Yes, see our [Google Analytics to PostHog migration guide](/docs/migrate/google-analytics) for more details.

### Does PostHog block bots by default?

Expand Down
Loading

0 comments on commit edeff0c

Please sign in to comment.