Don't make this personal
The reason LLMs behave sycophantically when answering your questions is that you unnecessarily cast yourself as a character in a relationship.
Consider this question:

This idea is clearly far from “fantastic”, so Gemini is now giving you bad advice.
The answer is a product not only of the model’s understanding of terrible startup ideas, but also by its understanding of relationships.
Because of how the question is framed, the model now simulates an interaction between you, the person excitedly pitching their “great” idea, and an I, which doesn’t exist - it will now start emulating some personality, and suddenly interpersonal dynamics come into play. (You wouldn’t want to break your friends heart and tell them their startup idea sucks?)
This issue is inherent to the way the models are created. After pretraining (where the models learn to predict the next word), the model goes through a second phase - called RLHF (reinforcement learning from human feedback). In this phase, the model is fine-tuned to give answers that people rate highly.
The issues is, humans tend to like being affirmed more than to be challenged, hence the models develop a tendency to be suckups.
Let’s compare our previous attempt to this question:

The model clearly didn’t spare your feelings in any way in this response, mostly because it didn’t know it was your idea in the first place.
If you ask the same question to an LLM and a human, LLMs will provide 50% more sycophantic answers than humans - they will take your side, even when you are wrong.
The model trying to guess what you want to hear does significantly worsen the truthfulness of its output.
Try removing the “you” and the “I” from the question, so that the model isn’t tempted to flatter you.