A passing remark about belief attribution

Let us start with the following simple scheme of belief attribution:

Agent G does action A.
Belief B is a reason for doing A.
—-
Therefore, A believes B.

To take an example, suppose George eats a sandwich. A reason for doing so would be provided by the belief that sandwiches are nutritious, so we could attribute that belief to George.

Now, what if George rejects the idea that sandwiches are nutritious and says that he only eats sandwiches because “it feels good to eat them”?

So now our scheme becomes:

Agent G does action A in order to achieve purpose P.
Given purpose P, belief B is a reason for doing A.
—-
Therefore, A believes B.

It seems that B can only have the form “A is necessary/sufficient for achieving P”. So we could attribute to George, in our previous example, the belief (B2) that eating sandwiches is sufficient for achieving culinary satisfaction (or enjoyment), but not the belief (B1) that sandwiches are tasty.

However, eating sandwiches could bring culinary satisfaction only if sandwiches were tasty. So (B1) expresses a necessary condition for (B2) being true.

Sure, but is holding (B1) a necessary condition for believing (B2)? One could, perhaps, believe that the culinary satisfaction comes from the act of eating sandwiches and not from their taste, for instance. To make the point clearer, people can have weird beliefs. What we are interested in is not a relation between the beliefs in question, but a necessary relation between the mental acts (or states, let’s say) of holding certain beliefs.

“But mental acts (or states) can enter only into causal relations.”

If we attribute beliefs based on causal relations, then why talk about actions at all? Our scheme would then be:

G has displayed behaviour A.
Holding belief B causes behaviour A.
—–
Therefore G believes A.

This, however, does not hold even when the behaviour in question is the verbal behaviour of uttering B. Holding the belief that B is not the only cause of uttering B (considered as verbal behaviour).

So it seems that we do not attribute beliefs only by observing behaviour and knowing some causal connections between holding certain beliefs and behaving in a certain way. But now the problem is: how can we make use of both causal and necessary relations when attributing beliefs?